1

I'm trying to click on the ViewMYMachines link, I'm not sure how to proceed, I suppose I have to use document.querySelectorAll

here is the link :

 <a data-auto-test-id="ViewMYMachines" href="/MYObjects/MYSupport.woo/ww/fsFSFSfdgdghHG/8.5.6.3.4.60.1">View</a>

here is my code

tell application "Google Chrome"
    tell tab 1 of window 1 to set clickOnTheLink to execute javascript "document.querySelectorAll('data-auto-test-id= > a')[0].click();"
end tell
  • I can found some element with "document.querySelector("td > a");" and eventually I'm sure I can get to what I want using a different index, but then I won't always work as the index might change (the index could be different regarding the page I'm loading) – Kevin May 16 '18 at 20:38

You must log in to answer this question.

Browse other questions tagged .