开发者

How to identify disabled radio buttons using Selenium IDE?

开发者 https://www.devze.com 2023-03-24 07:09 出处:网络
While recording the script using Selenium IDE,I\'m able to record Enabled \"ON/\"FF\" radio buttons. However , when I want to check the Disabled Radio Buttons, it is not showing invidual ID for ON or

While recording the script using Selenium IDE,I'm able to record Enabled "ON/"FF" radio buttons. However , when I want to check the Disabled Radio Buttons, it is not showing invidual ID for ON or OFF buttons. It shows only a single ID fo开发者_JAVA百科r both the Buttons in Disabled state. How would I get their status or ID individually when they are disabled..??


You can use Xpath to check if the disabled attribute is set properly. Use this as your target and replace id-Attribute with the name-attribute if needed and the content of the value-attribute. If no disabled-attribute exists, Selenium will display an error.

Xpath:

//input[@id='a' and @value='2']/@disabled


You should try verifyElementValue command :) or storeElementValue and then match result. you can see more information about this commands in Selenium

0

精彩评论

暂无评论...
验证码 换一张
取 消