Jump to content
UBot Underground

Css Difficult Elements To Select Where Element Offset Selects Too Many Elements Css Ubot 4


Recommended Posts

Hey

 

I was writing a script in Ubot 4,and the site I was trying to click elements was a nightmare,element offset was selecting too many,you cannot use click() in Ubot 4 in javascript,so made this simple command,you input a CSS Selector that matches the difficult elements to scrape,and id assigns them an ID

load html("<a onClick=\"this.textContent=\'clicked\'\" href=\"#\">review</a>
<a href=\"#\">review</a>
<a href=\"#\">review</a>
<a href=\"#\">review</a>
<a href=\"#\">review</a>
<a href=\"#\">review</a>")
define addCSSAttribute(#CSSPath) {
    run javascript("for (var x = 0;x < document.querySelectorAll(\"{#CSSPath}\").length;x++)\{

document.querySelectorAll(\"{#CSSPath}\")[x].id=\"ID\"+x

\}")
}
addCSSAttribute("a")
click(<id="ID0">,"Left Click","No")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...