botmaker7 5 Posted April 1, 2014 Report Share Posted April 1, 2014 This is so basic it seems it should work but it doesn't: set user agent("Android") navigate("http://www.google.com/alerts", "Wait") if($comparison($search page("Sign In"), "=", $true)) { then { alert("yes") } else { alert("no") } } When I CTRL + F in Firefox it finds 'Sign In' no problem but Ubot doesn't seem to. Any ideas? Quote Link to post Share on other sites
UBotDev 276 Posted April 1, 2014 Report Share Posted April 1, 2014 The problem is that the page doesn't load instantly and you actually need to wait for the page to load. The safest way to do this is to use "wait for element" command right after "navigate" command, but FYI there are also other wait commands that you can use. Quote Link to post Share on other sites
botmaker7 5 Posted April 2, 2014 Author Report Share Posted April 2, 2014 hey man! long time no talk!! what you recommended doesn't seem to fix it for me. I added the line: wait for element($element offset(<login link>, 0), "", "Appear") right under the navigate command but it still alerts "no" Quote Link to post Share on other sites
a2mateit 395 Posted April 2, 2014 Report Share Posted April 2, 2014 Hey botmaker, Use exists instead of comparison. Working code set user agent("Android") navigate("http://www.google.com/alerts", "Wait") if($exists(<innertext="Sign in">)) { then { alert("yes") } else { alert("no") } } Quote Link to post Share on other sites
nuc63 27 Posted April 2, 2014 Report Share Posted April 2, 2014 Having search page for "sign in" is to generic. The words can be in muliplte spots on page thus giving bad results. Thats why exist works better. Quote Link to post Share on other sites
UBotDev 276 Posted April 2, 2014 Report Share Posted April 2, 2014 hey man! long time no talk!! what you recommended doesn't seem to fix it for me. I added the line: wait for element($element offset(<login link>, 0), "", "Appear") right under the navigate command but it still alerts "no"Ah right, I didn't even notice...a2mateit is right. You should use $exist command instead of comparsion->search page. But still, you need that "wait for element" command. Quote Link to post Share on other sites
botmaker7 5 Posted April 3, 2014 Author Report Share Posted April 3, 2014 Cool I've never used that command. Thanks guys!! Quote Link to post Share on other sites
vonnch 1 Posted April 5, 2014 Report Share Posted April 5, 2014 Thanks for the command too. I got it working on other usage. Quote Link to post Share on other sites
a2mateit 395 Posted April 10, 2014 Report Share Posted April 10, 2014 Hey guys don't forget to check out the wiki and watch all of ubots tutorials. There are probably a bunch of other commands your not aware exist as well 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.