Sanjeev 46 Posted June 30, 2013 Report Share Posted June 30, 2013 Hello guys, couple of newbie question... Say in case of a bad internet connection- if the connection closes while a bot is processing/running - -- how do I check if the internet connection is active or not ? Also would it be an overkill to try and adjust the 'speed' of the bot based on the internet bandwidth of the user? - change the 'wait' and 'timeout' settings using variable values? - I could either let the user decide the' wait time' range or have the bot check some free online 'internet speed checker' sites and depending on the values returned set the 'wait/timeout' variables..? Thanks. Quote Link to post Share on other sites
SmileyBot 13 Posted July 5, 2013 Report Share Posted July 5, 2013 I overcome the different people connection speed issues by using the 'wait for element' instead of just using 'wait', if people are timing out with 1 'wait for element' in place add a second 'wait for element' as ubot will move past the command if taking to long Quote Link to post Share on other sites
Sanjeev 46 Posted July 7, 2013 Author Report Share Posted July 7, 2013 Add a second 'wait for element' ..? sounds interesting.. so if the first wait for element times out , the same command is repeated again ..below? Or Is it wait for some other element on page or same element..? Could I have some sample code please? Thanks. Quote Link to post Share on other sites
Walter1 8 Posted July 9, 2013 Report Share Posted July 9, 2013 A 'loop while' waiting for a element would solve this much easier... Quote Link to post Share on other sites
a2mateit 395 Posted July 9, 2013 Report Share Posted July 9, 2013 You can set the timeout in the advanced settings with a wait for element. So no need for the second wait for element. Personally I wouldn't use a wait for element, and instead let the user set their timeout settings. Quote Link to post Share on other sites
Sanjeev 46 Posted July 10, 2013 Author Report Share Posted July 10, 2013 Thanks for the opinions!Personally I wouldn't use a wait for element, and instead let the user set their timeout settings. I agree.. this seems to be the best way to deal with a lot of issues while structuring your bot..for example- Retries on failed captcha.. let the user decide the no. of retries..Random waits between web page navigation - this could be set by the user too. Quote Link to post Share on other sites
brusacco 20 Posted May 26, 2015 Report Share Posted May 26, 2015 It would be nice to have a "timeout" param in the Navigate command. Unreliable conections have timeouts errors. Quote Link to post Share on other sites
a2mateit 395 Posted May 27, 2015 Report Share Posted May 27, 2015 I believe Pash released a free plugin for this type of situation a long time ago. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted May 29, 2015 Report Share Posted May 29, 2015 Wait for element is best and in an loop while even better. You can use disappear too. i.e. wait for button to disappear then wait for an ?? element to appear. Put a variable or function in the timeout field. That will get from defaults from file or the UI (so user can set). CD 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.