I want if to search for a CSS selector and if this is found, the script is carried out further, and if the CSS selector is not found, it should repeat the if function until it's true.
Here is my code:
if driver.find_elements_by_css_selector('#buyTools > div.prl6-sm.prl0-lg > fieldset > div > div:nth-child(7) > label'):
driver.find_element_by_xpath('//*[@id="buyTools"]/div[1]/fieldset/div/div[7]/label').click()
else:
Thanks for help!