452 views 22 secs 0 comments

What Is ExpectedConditions In Selenium.

In General
April 15, 2021


Automation

QAutomation News / By Himanshu Sheth

The majority of the web products use AJAX (Asynchronous JavaScript and XML), due to which elements on the page are loaded at varying time intervals. This can lead to timing issues when automation testing is performed using the Selenium framework. What if a test is run on a WebElement that is not present in the DOM? The findElement function will raise ElementNotVisibleException.

Here are other scenarios that can cause issues in Selenium automation testing due to dynamic loading of elements:

  • WebElement (e.g. button) is visible but not clickable.
  • WebElement (e.g. label) is present in the DOM, but a certain text should be present in the element’s values attribute.
  • The title of the WebPage should consist of a case-sensitive substring and more.

The ideal way to overcome issues arising due to the dynamic loading of WebElements is by introducing Selenium waits in the test code implementation. Waits will provide the…



Continue reading on source link

Leave a Reply
You must be logged in to post a comment.