Xpath to determine checkbox “checked” attribute in Selenium IDE

前端 未结 5 780
无人及你
无人及你 2021-01-12 21:45

How to determine if a checkbox is check or not through xpath

Currently I am trying :

//input[@type=\'checkbox\' and @checked=\'true\')]
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-12 22:25

    something like this may works:

    //input[@checked='checked']/following-sibling::*[1][not(@checked='checked')]
    

提交回复
热议问题