I'm trying to get AppleScript to click on a button on a page, but it's not working. I keep getting the error "Expected end of line but found identifier" just after the 'do'.
Here's the code:
tell application "Firefox"
activate
open location "https://habitrpg.com/static/front"
end tell
delay 3
tell application "Firefox"
do JavaScript "document.getElementsById('frontpage-play-button').click();" in current tab of first window
end tell
Where am I going wrong please? Thanks in advance!