Пройдите по приведенному ниже коду, чтобы нажать на кнопку, когда она станет доступной и видимой, чтобы обновить страницу
button = browser.find_elements_by_xpath("//button[contains(@value, 'Refresh Page')]");
//To check button is present on page
if (len(button)>0):
//And is displayed
if button[0].is_displayed():
button[0].click()
else:
print "button not display"
else:
print("there is not refresh page button")
OR
// to check the dialog present here "show" is the class which retain by the div once the refresh button get enabled
if "show" in browser.find_element_by_id('timeout_dialog').get_attribute('class'):
browser.find_element_by_xpath("//button[contains(@value, 'Refresh Page')]").click()
else:
print "refresh button not displaying"
Примечание : сделать исправление синтаксиса согласно питону