Closed flc-unholster closed 8 years ago
We're using document.querySelector()
to find the element, so your second example should work e.g.
.click('div.paging > ul > li > a')
or if you want a specific index in the list:
.click('div.paging > ul > li:nth-child(3) > a')
Hello, the sample script for DuckDuckGo works perfectly, but what if I need to click on an element with a more convoluted path?
I need to click on a "next page" link. I can get it with this jQuery/Sizzle code:
Or like this too:
I can provide the URL to the page I'm working on if it helps, but I'm more interested in a general answer: how to get any element, no matter how deeply nested it is, when there's no handy id to get it.