Selenium Element Not Visible Exception

The element not visible exception is the exception where the element is not visible but it is present in the DOM.
There are some elements which are hidden and which are not visible on the screen.

The solution :
The user needs to refresh the page for the search of an element again to locate it.
The element needs to checked for its hidden id present in its HTML page, the developer as explicitly given its properties to be hidden.
The elements to be given with the exception for try and catch block with element not visible exception, to the run the script completely and capture the error logs in the reports.
The user needs to recheck in the previous release and current release information for the web element is present or not.
The user has to check documentation from requirements that the element is to present and should not give this exception, hence user report this exception as bug in the application.

Ex: WebElement theElementUserName = driver.findElement(by.xpath(“hidden”)).sendkeys(“krishna”);

Leave a Comment

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