I want to click only the first part of a element which has both a hyperlink(containing a checkbox) and non hyperlink part.In other word I want to check the checkbox.But I cannot separate only the checkbox part of the element.The selector when clicked always clicks the hyperlink part and takes me to a different page. I want to click only the part of the element which contains text I agree to the
.I am using css selector like '.Grid>div:nth-child(9)>button:nth-child(1)'
which chooses the entire selector or if I give [class="terms-conditions-input"]>label>:nth-child(1)
it gives me the hyperlink part only.But I just want the css selector for the 1st part without the hyperlink. The HTML for the element is given below:
<div class="qa-field qa-checkbox option option-form-control terms-conditions js-question-terms-conditions">
<div class="terms-conditions-input">
<input id="question-terms-conditions" class="pull-left parsley-validated" type="checkbox" data-validate-error-message="Please agree to the Terms & Conditions to continue" data-validate-mincheck="1" data-validate-required="true" name="terms-conditions"/>
<label class="pull-left" for="question-terms-conditions">
I agree to the
<a title="Terms & Conditions" target="_blank" href="http://ift.tt/1JDvcJX"> Terms & Conditions </a>
</label>
Is there any way to create a css selector for only the I agree to the
part of the element.
Aucun commentaire:
Enregistrer un commentaire