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
精彩评论