I would like to ask whether there is an option in robot (using selenium2library) to set some implicit wait for ALL elements which should be located during the test on just one place? Currently I place the wait before EACH element in my keywords (which does not look so nice)
Wait Until Element Is Visible ${repeated for each element}
The frontend is made in Angular. I found that it might be the cause of the troubles and I also found some extended selenium2library, BUT I cannot use this extended library, because I can use only officially supported library (which is now just selenium2library)...
I also tried to set the implcit wait and timeout while importing the Library, but it seems it does not help (if I comment my "waits" before each element, it starts failing again)
Library Selenium2Library 10 15
Any suggestion? Do I really have to put the wait before each element in this case?
Thank you
Wait Until Location Is – Waits until the current URL is expected. Wait Until Location Is Not – Waits until the current URL is not location. Wait Until Location Contains – Waits until the current URL contains expected. Wait Until Location Does Not Contain – Waits until the current URL does not contain the location.
Implicit wait specifies the maximum time how long Selenium waits when searching for elements. It can be set by using the Set Selenium Implicit Wait keyword or with the implicit_wait argument when importing the library.
Nowadays Selenium2Library is just a thin wrapper to SeleniumLibrary that eases with transitioning to the new project. See SeleniumLibrary and Selenium2Library project pages for more information. Selenium2Library is a web testing library for Robot Framework.
END Use Run Keyword If in Robot Framework Run Keyword If ${True} Log This line IS executed. Run Keyword If ${False} Log This line is NOT executed. Use Run Keyword Unless in Robot Framework Run Keyword Unless ${True} Log This line is NOT executed. Run Keyword Unless ${False} Log This line IS executed.
I don't know if there's a better approach, but you can try slowing down Selenium with Set Selenium Speed
:
Set Selenium Speed 0.5 seconds
http://robotframework.org/Selenium2Library/Selenium2Library.html#Set%20Selenium%20Speed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With