I'n trying to check multiple checkboxes through my python code:
checkboxes=driver.find_elements_by_xpath("//input[@type='checkbox']")
for i in range(0,len(checkboxes)):
if checkboxes[i].is_selected():
time.sleep(2)
else:
checkboxes[i].click()
It works fine for the first checkbox but it fails for the rest giving me the following error:
Element <input _ngcontent-rnm-59="" type="checkbox" class="ng-untouched
ng-pristine ng-valid"> is not clickable at point (584, 215).
The HTML code of the dropbox is as follows:
<div class="ps-content">
<div _ngcontent-rnm-59="" style="width: 300px;" class="scroll-300">
<!--template bindings={}--><div _ngcontent-rnm-59="">
<!--template bindings={}--><div _ngcontent-rnm-59="">
<label _ngcontent-rnm-59="" style="width: 100%; background-color: #d6d4d4">
LTE BASIC - Serving Cell
</label>
<!--template bindings={}--><li _ngcontent-rnm-59="" style="margin-right:-20 px">
<div _ngcontent-rnm-59="" class="checkbox-new" style="display:flex; width:100%; justify-content: space-between;">
<label _ngcontent-rnm-59="" style="width: 100%">
<input _ngcontent-rnm-59="" type="checkbox" class="ng-valid ng-dirty ng-touched"><span _ngcontent-rnm-59="" class="checkbox-material"></span> Voice RAT
</label>
Please suggest the way to debug it.