deliter 203 Posted March 2, 2016 Report Share Posted March 2, 2016 Hey this is for chrome 39 only Uses CSS Path to click elements,to generate the CSS path,open web inspector,click the magnify glass,and select the element you want to click,go back to web inspector,the button is highlighted in blue,right click,select copy css path define CSS Path Click(#CSS Path) { wait for browser event("DOM Ready","") run javascript("document.querySelector(\"{#CSS Path}\").click()") } navigate("http://www.ubotstudio.com/resources","Wait") comment("clicks the contact href") CSS Path Click("#util-nav > div > ul > li:nth-child(3) > a") 1 Quote Link to post Share on other sites
Ricx 3 Posted March 3, 2016 Report Share Posted March 3, 2016 It almost seems as if the gods sent you to deliver this piece of glory. I was googling this all yesterday, but the xpath version and failed. This is greatly appreciated. 1 Quote Link to post Share on other sites
Varo 28 Posted March 3, 2016 Report Share Posted March 3, 2016 Thanks for this deliter. Another easy way to generate css path in Chrome using extension https://chrome.google.com/webstore/detail/selectorgadget/mhjhnkcfbdhnjickkkdbjoemdmbfginb 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.