when I click on a button it takes approx 8-10 mins to run the job behind it so in that case page keeps on loading (for approx 8-10 mins). After that I have to execute other steps but the script keeps on failing throwing Timeout even if the job is executed within 8 mins. I have set implicit wait of around 10 mins
Proxy as Admin
${time} get selenium implicit wait
set selenium implicit wait 10min
click link ${mnu_admin}
click link ${ddl_run_conflict}
set selenium implicit wait ${time}
I tried this (# Wait For Condition return document.readyState == “complete”) as well but no luck.
Try placing a space between the 10 min
looking at the specifiers for “time as time string”, minutes, minute, mins, m are all valid, but you don’t have a space between 10 and min, and have your value as 10min so this could be why?
Note: Selenium libraries Set Selenium Implicit Wait only speaks of seconds though? I never had a need to use this kw (don’t use this library) or have had the need to set anything in minutes, so I can’t confirm other than what’s mentioned and if minutes is allowed here, and possibly 600 seconds is what you’d pass instead.
I never understood why but Selenium has 2 timeouts, a low level one and a high level one (not sure which is which I think the implicit wait is the high level one). This is not something that SeleniumLibrary did, it’s in the underlying Selenium test tool.
I guess you’re test is failing on one of these to steps?:
click link ${mnu_admin}
click link ${ddl_run_conflict}
So maybe all you need to do is set them both to 10 min, though if your background job can run up to 10 min I’d suggest setting it to no less than 20 min as these values are not how long the test will wait but the maximum time the test will wait, so for example if you set the timeout to 30 min and the element ${ddl_run_conflict}is visible after 8 min, the test won’t wait 30 min, it’ll click the link after the 8 min once it’s available, what will happen is the test will fail if the link didn’t appear before the timeout period.
This is why I suggest as a minimum double the maximum time you think the job will run for, so all you test to pass even if it takes 15 min (unless you have an SLA that says the job must take no more than 10 min, in that case set your timeout to 10 min and let the test fail for not meeting the SLA)