lundi 25 octobre 2021

Selenium Python Checkbox Click

I am trying to access the following HTML checkbox for a button click:

<input type="checkbox" data-ng-value="sf.name" data-ng-model="sf.checked" ng-click="ec.onStateFilterChanged(sf)" title="Select a state" class="ng-untouched ng-valid ng-dirty ng-valid-parse" value="Arizona">

using:

state = driver.find_element_by_xpath("input[@type='checkbox']").click()

but keep getting error:

selenium.common.exceptions.NoSuchElementException: Message: 

what might be the element path I am looking for in order to select the checkbox?




Aucun commentaire:

Enregistrer un commentaire