SeleniumLibrary
SeleniumLibrary copied to clipboard
Add API to set page load timeout (#1535)
Hi there,
this PR addresses issue 1535.
The issue requested there be an api to set selenium page load timeout.
Currently, SeleniumLibrary supports
- a global timeout, which is used mostly as a poll for assertions
- implicit_wait, which is the time to wait for locators
In addition to that, the selenium project offers a page load timeout, which is the amount of time to wait for page to complete loading before an error is thrown.
As @aaltat argued
At least we should add keyword to set the page load timeout, in similar functionality Set Selenium Timeout. But should page load timeout be also library level import? It is question which does not have clear answer. Page load timeout is not needed that often than other timeouts, but for consistency reason it would be good to have in the library init. I would say that consistency is good thing in this matter and lets add it in the library init too. [1]
Therefore, I created both the init argument as well as two new keywords, Set Selenium Page Load Timeout
and Get Selenium Page Load Timeout
.
Note that this is my first contribution to this project, and while I tried to follow the instructions with due diligence, there are most certainly things that I have forgotten or misunderstood.
So please reach out in case there are any questions or suggestions.
Regards, Robin
[1] https://github.com/robotframework/SeleniumLibrary/issues/1535#issuecomment-572144557
Hi guys, I was looking on how to change the default timeout on a Go To keyword and found this MR, I'm really interested, if it can be merged please. Thx !