spa3212 1 Posted December 20, 2016 Report Share Posted December 20, 2016 Hi,This can be very simple for someone.. loop while($not($find regular expression(#website, #website))) { wait(5) click(<innertext="Next">, "Left Click", "No") actually loop and click next untill it find particular regular expression..But the loop never stops even it find that regex on page..I want it to stop or break loop and move to next command.. plz help Quote Link to post Share on other sites
stanf 43 Posted December 20, 2016 Report Share Posted December 20, 2016 i ran into that a couple times, try thisset condition noloop while condition = noif element exist set condition to yesdont ask me whybut setting your loop to look for something always sems to failalso ad a 1 sec delay before testing for condition Quote Link to post Share on other sites
spa3212 1 Posted December 21, 2016 Author Report Share Posted December 21, 2016 (edited) would be great if you can give code what you did. Edited December 21, 2016 by spa3212 Quote Link to post Share on other sites
spa3212 1 Posted December 21, 2016 Author Report Share Posted December 21, 2016 i ran into that a couple times, try thisset condition noloop while condition = noif element exist set condition to yesdont ask me whybut setting your loop to look for something always sems to failalso ad a 1 sec delay before testing for condition Quote Link to post Share on other sites
spa3212 1 Posted December 21, 2016 Author Report Share Posted December 21, 2016 I there anyone who can help Quote Link to post Share on other sites
sbm128 12 Posted December 22, 2016 Report Share Posted December 22, 2016 This might look a little more complicated than what you're trying to do, but it accomplishes what stanf mentioned. I've had the same issue before as well. I've tackled the issue a variety of ways, but what stanf mentioned works 99% of the time. All we're doing is sayingwhile #triggerCondition=0, Loop.In the loop --we're looking for a sample of HTML using regex.-If that sample is found, it is set as variable #regexFound-If #regexFound contains that HTML sample-we set #triggerCondition=1Which halts the Loop I'm sure there is a more pragmatic way to do this same thing, probably cleaner too, but that's just not my style uBot Code below, followed by screenshot of uBot Nodes + brief step-by-step explanation. set(#triggerCondition,0,"Global")navigate("https://ubotstudio.com/site/playground-simple-form/","Wait")loop while(#triggerCondition = 0) { set(#regexFound,$find regular expression($document text,"value.*Submit"),"Global") if($contains(#regexFound,"value=\"Submit")) { then { set(#triggerCondition,1,"Global") } else { alert("Regex Not Found! Continuing Loop...") stop script } }} http://i.imgur.com/qk9nyHJ.png Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted December 27, 2016 Report Share Posted December 27, 2016 Try this loop while($comparison($find regular expression(#website,#website),"!= Does not equal",$nothing)) { wait(5) click(<innertext="Next">,"Left Click","No") } CD Quote Link to post Share on other sites
stanf 43 Posted December 29, 2016 Report Share Posted December 29, 2016 Try this loop while($comparison($find regular expression(#website,#website),"!= Does not equal",$nothing)) { wait(5) click(<innertext="Next">,"Left Click","No") } CDdo you find that searching for the lack of nothingworks better than searching for something?i hope my question is clear. 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.