automator fifa 19 web app

by Alex   Last Updated October 10, 2018 01:12 AM

I'm trying to click the reset button in Fifa 19 web app with automator.

enter image description here

codes I've tried.

tell application "Safari"
    activate
    tell current tab of window 1
        do JavaScript "document.getElementsByClassName('btn-standard')[0].click()"
    end tell
end tell

second one

to clickClassName(theClassName, elementnum)

  tell application "Safari"
      activate

      do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].click();" in current tab of first window

  end tell

end clickClassName
clickClassName("btn-standard", 0)

nothing works any idea why ?

Tags : automator


Related Questions


launching automator with keywords

Updated April 09, 2015 19:05 PM


Filter Finder Items action runs for forever

Updated July 24, 2015 13:05 PM