So, there is a site that gets generated by javascript. And updates every second. And I want to get the values every second. But the site will pop up a modal asking "Are you still here". And then you need to click the button. So first my code looks like this:
try:
button = browser.find_elements_by_xpath("//button[contains(@value, 'Refresh Page')]");
button.click()
rounds = rounds+1
except:
rounds = rounds+1
But when I look at my browser, it still reloads every round, even tho it doesn't show up in screen.
How can I make this work, to only click the button when it's on screen? Thanks!
find_elements_by_xpathtofind_element_by_xpathand try