Selenium Doesn't Refresh Page on Jenkins

Refreshing Web Page By WebDriver When Waiting For Specific Condition

In Java or JavaScript:

driver.navigate().refresh();

This should refresh page.

webdriver (c#) - looping page refresh until an elements style doesn't exist

I am not sure what language binding you are using but looks like a mixture of C# and java and if that's the real test code it will not work.

Use do while loop to do a post check and check if the attribute has expected value or not.

IWebElement MyElement = Driver.FindElement(By.Id("example"));
string MyElementStyle = MyElement.GetAttribute("style");

do
{
Driver.Navigate().Refresh();

} while (MyElementStyle.Contains("hidden: true;"));

Refreshing the page and check for text every 10 seconds in python selenium

you are missing to call the re.search again. You can wrap your search thing in a function and use recursion.

def foo():
src = driver.page_source
success = re.search(r'Finished: SUCCESS', src)
failure = re.search(r'Finished: FAILURE', src)

if success:
print ('success')
if failure:
print ('failure')
else:
driver.refresh()
time.sleep(5)
foo() ## your function gets called again

foo() ## call your function for the first time

How to refresh a page on browser using selenium-webdriver?

You can use the Navigation#refresh method:

driver.navigate.refresh

Jenkins GUI very slow - fast after browser cache clear

Update: This is the Jira ticket regarding this issue:

https://issues.jenkins-ci.org/browse/JENKINS-56243

Quite a few people are having the same problem, and Active Directory does not seem the root cause because people report having the same issue without AD integration.
Unfortunately the Jenkins developers do not seem to give it much priority...



Related Topics



Leave a reply



Submit