How to handle hidden webelements in Selenium Webdriver

Today we will see how to handle hidden webElements in Selenium. Sometimes you will get into this scenario where your elements on which you want click contains Pseudo Elements (::after or ::before).

One of the way to get the correct element by finding it’s X and Y co-ordinates. Below is the example for that.


It will find the present locator and click on the element. Please share your review and give your comment.

How to open chrome browser with web security disable in selenium

Let’s see how we can open chrome browser with web security disable in selenium. Below is the running code.

Please share your feedback.

How to iterate elements of a list and click on a specific element in selenium?

Suppose we have a situation where we have a menu which contains 16 elements and you need to click one of them. The most generic solution is to find out the list locator and then iterate it one by one. Let’s see it using an example below.

We are opening website where we have more than 15 options in the Menu. We will iterate it one by one and click on the News menu.

The result will first print all the options available and then click on the NEWS. Please email at if you have any questions.

If you like then share it with your friends.