Xpath to determine checkbox “checked” attribute in Selenium IDE

前端 未结 5 739
无人及你
无人及你 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:12

    enter image description here

    Here stnewrecord is class of check-box. Script will store number of check-box, and according to that loop will follow. It will check whether check-box is checked or not if not it will check else move to next step.

    xpath=(//input[@class='stnewrecord'])[${i}]  
    

    This is xpath of check-box. 'i' is position, it will increase on each iteration.

    Let me know whether its working for you or not..

提交回复
热议问题