jaysankey 0 Posted December 22, 2015 Report Share Posted December 22, 2015 (edited) 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 December 22, 2015 by jaysankey Quote Link to post Share on other sites
icaglobalrep 0 Posted December 28, 2015 Report Share Posted December 28, 2015 I tryed to figure out your problem but i can't but am interested in the answer/ Quote Link to post Share on other sites
deliter 203 Posted December 30, 2015 Report Share Posted December 30, 2015 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 { } } Quote Link to post Share on other sites
Frank 177 Posted December 30, 2015 Report Share Posted December 30, 2015 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.