I am trying to achieve the feature of a Python script using selenium to keep refreshing the current chromepage until, for example, the certain item that makes driver.find_element_by_partial_link_text("Schott")
is found.
I was thinking about this:
while not driver.find_element_by_partial_link_text("Schott"):
driver.refresh
driver.find_element_by_partial_link_text("Schott").click()
However, it seems like the function driver.find_element_by_partial_link_text("Schott")
is not the way to match the need. Is there other way I can achieve this please?
BTW, currently I am using driver.get(url) to open the webpage but I am wondering how do i run the script on existing webpage that I already open?