WebDriver Rule of Thumb

Rule of Thumb
WebDriver mimics the real world user behavior as closely as possible. Since real world user is not able to interact with any invisible element or elements not rendered yet, neither does webDriver.

So we need to always make sure that the web element is in right status before we try to interact with it. It is because of rule of thumb, as an automation engineer we need to understand

  • Where-about of an web element: where is it now? On the way to browser? In the DOM? on the Page? Visible? Enabled? Staled? Dead?
  • Page loading status: If the page is fully loaded yet?
  • JavaScript/Ajax’s impact on Page Load and page updating

We thus need to understand how web works, how browser retrieves & renders the page. We also need to understand javaScript, and Ajax, especially AJAX since it is ubiquitous now.