Jump to content
UBot Underground

Search For Text Inside Element


Recommended Posts

Hi Guys,

 

I'm setting an IF statement. But for the IF to continue to THEN, I would like to check to make sure if certain text exists in an element. I haven't used uBot in awhile but I can't quite seem to accomplish what I'm trying to do.  It's probably super simple and I thought I would use a comparison, but not sure if you can compare an element?

 

Again that's for your help.

Link to post
Share on other sites

Not 100% sure its what you're asking but 

set(#tempvariable, $scrape attribute(<id="YOURELEMENTGOESHERE">, "innertext"), "Global")
if($contains(#tempvariable, "YOURSEARCHTEXTGOESHERE")) {
    then {
        set(#result, "found", "Global")
    }
    else {
        set(#result, "not found", "Global")
    }
}

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...