You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for your great work, I'd like to know how to get the elements array as in chrome console: $$("div.item"), then, i can iterate the arrays to click the items, thanks in advance
The text was updated successfully, but these errors were encountered:
Hi Penn, in theory, you can pass back the object through stringified JSON using r.dom(), then parse it back into an object.
However, it is much easier to code and maintain the script, if you use XPath to reference the elements array. The syntax is (XPath)[n] where n is the nth element that matches the XPath provided. r.count() can be used to detect how many elements in total to loop through and process. See eg here.
kensoh
changed the title
how to scrape element array
How to scrape element array - use XPath with element number
Jun 23, 2020
First of all, thanks for your great work, I'd like to know how to get the elements array as in chrome console: $$("div.item"), then, i can iterate the arrays to click the items, thanks in advance
The text was updated successfully, but these errors were encountered: