Set timeout Create Webdriver

I have some proxy issues within my environment. That means i am receiving WARN because plausible.io and googhechromelabs can not be reached when Create Webdriver will be used. Thats kind of okay for me currently, but i will take 5min each time i create a new Webdriver and it seems to be an timeout.

Is there a way to set the timeout less than 5min.

Thanks.

You have a few options like Set Selenium Timeout from SeleniumLibrary (https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Timeouts%2C%20waits%2C%20and%20delays) & Test Timeout from the Robot Framework also (Robot Framework User Guide)However in this case, this sounds like a specific case only for initially creating the webdriver & the 5 minute delay won’t really appear afterwards. In this case, personally I’d be tempted to then create my own keyword purely for this operation, something like:

Create WebDriver keyword here
Capture the current, method-starting time, store it to a variable
Attempt to create WebDriver
Did it succeed?
- yes? possibly log, then return from this method
- no?
-- then check the method-starting time against the actual current time? are we past 5 minutes? If so, fail this keyword & exit/return
-- otherwise, sleep for 500ms, then continue this whole block, from "Attempt to create WebDriver" again in a loop

Hi Andreas,

According to the documentation for Create Webdriver, I see you can pass Selenium API documentation as arguments to **init_kwargs.

I’ve never done this myself, but I did see selenium.webdriver.common.timeouts in there, maybe that’s helpful?

Dave.

1 Like

Thanks for your feedback. I like the idea but @damies13 answers gave me the better hint to solve the issue. Thanks

1 Like