I am writing a selenium script to perform form fills at a certain time of day.
I currently have the form fills scheduled with Python's schedule module however this uses my system time. The issue is my system time is not synced with the websites server time. Fortunately, the website has a live clock in the page.
I inspected the clock element which is as follows:
<span>The Time is: <b class="jquery_server_clock" dfc="pv">5:24:59 PM</b></span>
What I am trying to do is monitor the live clock on the website and when it hits a certain time perform an action - I was thinking with a 'while loop'.
Something like:
while true:
t = "jquery_server_clock"
if t = "6:00:00 PM"
driver.find_element_by_name("submit").click()
I can't seem to get the clock time into a variable to monitor at this point. After I get that I'm sure I could get the while loop working.
Thank you for the help!