In my automation, at one point I have to refresh the page to get the updated page content. But during the refresh the webpage is asking for a confirmation to resend the data (basically an alert is displayed on the page).
Even though I switched the focus to the alert and accepted it, the page contents are not getting refreshed. If I manually do the same, page contents are getting refreshed.
Is there any alternative way to refresh the page using Selenium Webdriver apart from navigate().refresh() command?
Or is there any way I can click on the Retry button on the alert without accepting the alert??
In ruby try using this - @driver.switch_to.alert.accept
this will click on Resend
java code driver.switchTo().alert().accept();
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