I was trying to find a Firefox equivalent to the script in the link above under the line "Safari's Reload button", which monitors particular properties of Safari's Reload button. Therefore, I tried to write my own script for Firefox:
tell application "Firefox" activate end tell tell ¬ application "System Events" to tell ¬ process "Firefox" to tell ¬ window 1 to tell ¬ toolbar 2 to tell ¬ groups to tell ¬ UI element 1 to ¬ set reload_button to a reference to ¬ (first button whose name is "Reload current page") using terms from application "System Events" repeat until the accessibility description ¬ of the reload_button ¬ contains "Reload current page" end repeat end using terms from log "Finished loading"
However, my script fails at "tell window 1". I guess many parts of the script do not work for Firefox. How should I modify the script?