简体   繁体   中英

Checkbox selection in selenium webdriver

I am facing issue in checkbox selection, there id changing dynamically, so that I cant able click on that checkbox. How to achieve that?

<a id="ext-gen208" class="x-menu-focus" href="#" onclick="return false;" tabindex="-1"></a>

You can use any of the xpath below:-

//a[contains(@id, "ext-gen")]

OR

//a[starts-with(@id, "ext-gen")]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM