Jump to content
UBot Underground

Exist - Function And Hidden Text


Recommended Posts

Hi,

 

I am new to ubot and have been experimented with creating a few account-creator bots.

 

There is one problem though:

 

I want the bots to give  me an alert if the username I chose is already taken or invalid.

 

For Livejournal that part looks like this:

 

type text($element offset(<username field>,1),#usernamelivejournal,"Standard")

click($element offset(<username field>,1),"Left Click","No")                                          

if($exists($element offset(<class="b-popup-inner">,6))) {
    then {
        alert("Error: Username already taken.")
    }
    else {
    }
}

 

 

So basically the bot uses the username specified before and clicks the text field after that. If the username is invalid or already taken this click will trigger an error message in the browser.

The if-function above is supposed to recognize that error message and give me an alert if that error message exists. 

 

The problem is that so far the if-function always triggers the alert - even if the specified username is valid and does not trigger the error message inside the browser.

 

I assume this is due to the fact that the html element inside the "exist"- function exists even if the text is not visible in the browser.

 

What is the correct way around this?

 

 

 

Another question: Is it not possible to create a bot for wordpress and tumblr right now? The browser inside ubot seems to be the problem here. It does not load the pages properly. Is there a (planned) fix for this?

 

Thank you all for your help and patience already.

Edited by jaysankey
Link to post
Share on other sites

navigate("https://www.livejournal.com/create","Wait")
wait for browser event("DOM Ready","")
type text($element offset(<username field>,1),"david2015","Standard")
type text(<email field>,"someEmail@mail.com","Standard")
wait(1.5)
set(#nameExists,$scrape attribute(<lj-html-live="errors.username">,"innertext"),"Global")
if($comparison(#nameExists,">",$nothing)) {
then {
alert("taken")
}
else {
}
}

Link to post
Share on other sites

This normally takes some deep looking into the web page. I'm automating google properties and this is a common occurrence. I've been looking deep into the code and putting extra conditions like 'display:none' - things like that.

 

Frank

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