Answers for "how to select checkbox in selenium python"

1

how to select checkbox in selenium python

import time

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException

browser = webdriver.Firefox()
url = 'http://reverb.echo.nasa.gov/reverb/'
browser.get(url)

for i in range(10):
    try:
        browser.find_element_by_xpath(
            ".//*[contains(text(), '15 Minute Stream Flow Data: USGS (FIFE)')]"
        ).click()
        break
    except NoSuchElementException as e:
        print('Retry in 1 second')
        time.sleep(1)
else:
    raise e
Posted by: Guest on October-11-2021

Code answers related to "how to select checkbox in selenium python"

Python Answers by Framework

Browse Popular Code Answers by Language