Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98893

How to identify a bootstrap custom-control-input of type checkbox through Selenium

$
0
0

I'm writing a web-app with java. I'm testing all the html pages with selenium-java but I've a problem with the custom forms that comes from bootstrap 4

Going in deep, I've the following code

<input class="custom-control-input"
       type="checkbox"
       id="registerForm:termsCheckbox"
       border-color:lime" required="true"/>
  <label class="custom-control-label" for="registerForm:termsCheckbox">
     I agree to <a href="terms.html" 
          style="text-decoration:underline; color:lime">terms and conditions
                </a>
  </label>

With this code, Even though the checkbox is visibile, apparently bootstrap hides the control. And with Selenium I don't know how to click on the checkbox. Seems that the visible checkbox is an ::before or ::after.

How can I select with Selenium a bootstrap custom-control-input of type checkbox?

Thank you


Viewing all articles
Browse latest Browse all 98893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>