webpro 31 Posted October 13, 2016 Report Share Posted October 13, 2016 I'm trying to figure out, how to tell UB to stop the bot if this url shows up (let's say) 5 times in a rowhttp://www.site.com/index.php?not-found How would you guys code this? Thanks Quote Link to post Share on other sites
nuc63 27 Posted October 13, 2016 Report Share Posted October 13, 2016 Add an if statement with exists and then stop script Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 13, 2016 Report Share Posted October 13, 2016 Set a var to be 0If $url = x then increment variable else set var to be 0If var = 5 then stop Quote Link to post Share on other sites
pash 504 Posted October 14, 2016 Report Share Posted October 14, 2016 Sample ui stat monitor("Error Count: ",#ErrorCount) set(#ErrorCount,0,"Global") loop(10) { navigate("http://www.site.com/index.php?not-found","Wait") if($contains($document text,"404 Not Found")) { then { increment(#ErrorCount) } } if($comparison(#ErrorCount,">= Greater than or equal to",5)) { then { stop script } } } 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.