Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

To verify the radio buttons and checkboxes enabled, displayed or default selected?

Category: Selenium WebDriver

isDisplayed()

WebElement radioBtn = driver.findElement (By.id(“gender-male”));

radioBtn.isDisplayed // this returns a Boolean value, if it returns true then said radio button is present on the webpage or it returns False.

isEnabled()

radioBtn.isEnabled() // this returns a Boolean value, if it returns true then said radio button is enabled on the webpage or it returns False

isSelected()

radioBtn.isSelected() // this returns a Boolean value, if it returns true then said radio button is selected or it returns False

Leave a Reply

Your email address will not be published. Required fields are marked *