Find an Xpath Element in Google Chrome's 2nd Tab (Inactive) and Refresh It Until the Xpath Vanishes

I am using chrome with only 2 tabs open.
I want to look for xpath and refresh the 2nd tab not the first open/active tab.

Would appreciate your help.

window.location.reload() reloads the active tab

Hey @forums2012,

You'll have to resort to running your JavaScript from AppleScript to accomplish this.

set jsCmdStr to "

tell application "Google Chrome"
   tell front window's second tab
      execute javascript jsCmdStr
   end tell
end tell

You can search for your Xpath in similar fashion.


Awesome. Thanks a lot. :slight_smile: