Skip to content
Advertisement

auto refresh page while element is not clickable (python)

Objective: Find an appointment

Code:

JavaScript

While the code works, I would like to extend it by making it do auto-refresh every 5 second interval until the element on 9 September 2022 is clickable.

enter image description here

I am thinking of something like

JavaScript

but the second part of the code does not work.

An example of a clickable date is on Nov 4. enter image description here

Update: Added a while True loop

JavaScript

I am not sure whether the code above does the job properly, because it seems that every new line is printed in less than 1 second, whereas it is supposed to take a 5 second pause before refresh.

Advertisement

Answer

You can check the class name on that element instead, that will give you the same information as is_clickable, would such a function exist (assuming the red ones are not clickable and the white ones are. If you need a blue one, look at the css class on that one and see if that is in the class name).

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement