I tried to do check box by using Python Selenium but I got the following error.
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
The element is wrong but I'm not sure where it is. This is how HTML is.
<div _ngcontent-yfw-c1="" class="col-md-12 text-center form-group mt-4 p-2" id="iAcceptCheckboxLabel">
<input _ngcontent-yfw-c1="" class="checkbox ng-valid ng-dirty ng-touched" id="iAcceptCheckbox" name="checkbox" type="checkbox">
<label _ngcontent-yfw-c1="" class="font-weight-normal" for="iAcceptCheckbox"> I accept the
<a _ngcontent-yfw-c1="" class="ng-tns-c1-0" href="/terms" id="terms-link" target="_blank">terms and conditions</a>
</label>
</div>
I did python like this.
# I accept the terms and conditions
check = driver.find_element_by_class_name("checkbox")
check.click()
time.sleep(1)
Added
Finally, this code succeeded.
check = driver.find_element_by_id("iAcceptCheckbox")
driver.execute_script("arguments[0].click();",check)
