I want to click an input element with selenium, it’s a checkbox you have to toggle to go further, but it doesn’t click the element like all the other elements i have let selenium find and click so far
the code i have:
<code>ik_ga_akkoord = wait.until(EC.element_to_be_clickable((By.XPATH, '//span[contains(text(), "Ik ga akkoord met de")]')))
ik_ga_akkoord.click()
</code>
<code>ik_ga_akkoord = wait.until(EC.element_to_be_clickable((By.XPATH, '//span[contains(text(), "Ik ga akkoord met de")]')))
ik_ga_akkoord.click()
</code>
ik_ga_akkoord = wait.until(EC.element_to_be_clickable((By.XPATH, '//span[contains(text(), "Ik ga akkoord met de")]')))
ik_ga_akkoord.click()
the html part:
<code><div class="col-xs-12" ng-show="option.infoLinks || addon">
<p ng-show="!subscriptionSettings.isPreparing" class="" style="">
<label class="font-normal">
<input type="checkbox" id="agree" ng model="subscriptionSettings.termsagreement" value="true" ng-click="toggleConfirmButton()" class="ng-pristine ng-untouched ng-valid ng-empty">
<span class="margin-left">Ik ga akkoord met de
<a class="blue-link" ng- href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm" target="_blank" href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm">voorwaarden
</a>
</span>
</label>
</p>
</div>
</code>
<code><div class="col-xs-12" ng-show="option.infoLinks || addon">
<p ng-show="!subscriptionSettings.isPreparing" class="" style="">
<label class="font-normal">
<input type="checkbox" id="agree" ng model="subscriptionSettings.termsagreement" value="true" ng-click="toggleConfirmButton()" class="ng-pristine ng-untouched ng-valid ng-empty">
<span class="margin-left">Ik ga akkoord met de
<a class="blue-link" ng- href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm" target="_blank" href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm">voorwaarden
</a>
</span>
</label>
</p>
</div>
</code>
<div class="col-xs-12" ng-show="option.infoLinks || addon">
<p ng-show="!subscriptionSettings.isPreparing" class="" style="">
<label class="font-normal">
<input type="checkbox" id="agree" ng model="subscriptionSettings.termsagreement" value="true" ng-click="toggleConfirmButton()" class="ng-pristine ng-untouched ng-valid ng-empty">
<span class="margin-left">Ik ga akkoord met de
<a class="blue-link" ng- href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm" target="_blank" href="https://www.kpn.com/service/mijnkpn/voorwaarden- aanpassen-abonnement-extraopties.htm">voorwaarden
</a>
</span>
</label>
</p>
</div>
I hope someone has an answer 🙂
New contributor
qukalino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.