Get text of Firefox window

Dear Anyone,
I apologise if this is covered elsewhere, but a search with the terms “Firefox”, “text” & “window” yielded nothing.
I have written a script to load a specific URL in Firefox, and then would like to extract the text from the window.
In Safari, this is easy (“text of document 1”), but Firefox does not recognise this instruction, and the Dictionary of Firefox is brief to say the least.
At present I am instructing System Events to press ‘command a’ then ‘command c’, then reading the clipboard.
Is there a better way?
Thanks,
PJ.

Edit: P.S. Oops - sorry, just realised I put this in the XCode forum. How do I go about moving it? Thanks.

You’ve probably found the best method - using System Events. Firefox, while a great browser, doesn’t support Applescript, really, and isn’t likely to. Mostly because Firefox’s main idea is to provide the same browser on all platforms, and Applescript is OS-specific.

If your solution works, who cares how? :slight_smile: