SELENIUM BASICS:


SELENIUM WEBDRIVER:


TESTNG:


REPORTS:


BUILD & CONTINUOUS INTEGRATION TOOLS:


CROSS BROWSER TESTING:


MOBILE TESTING:


AUTOMATION FRAMEWORKS:


API Testing:


INTERVIEW QUESTIONS:


SAMPLE RESUME:

Check Web element Visibility Using Selenium WebDriver Commands – IsSelected IsDisplayed IsEnabled

How to check Web Element visibility using Selenium WebDriver:

To check the web element visibility using Selenium WebDriver, we do use the following methods. We could check the web element visibility using Selenium such as buttons, checkboxes, radio buttons, drop down boxes etc.,

  • Boolean isSelected(): This method is used to verify the element is selected or not. This method returns a true value if the specified element is selected and false if it is not selected.  It is widely used on checkboxes, radio buttons, and options in a select.
  • Boolean isDisplayed(): This method is used to verify the presence of the element. It determines if an element is displayed or not. This method returns a true value if the specified element is displayed and false if it is not displayed.
  • Boolean isEnabled(): This method is used to verify whether the element is enabled or not. It returns a true value if an element is enabled and false if it is not enabled.
Let’s see a practical example to check web element visibility using Selenium WebDriver.

Given clear explanation in the comments section within the program itself. Please go through it to understand the flow.

Execute the above script and see the console output.

Also Read: Extent Reports in Selenium WebDriver

If you are not a regular reader of my blog then I highly recommend you to signup for the free email newsletter using the below link.

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar

Leave a Comment

API Testing eBook

DOWNLOAD FOR FREE