seleniumselenium-webdriverdomwebdriverwaitexpected-condition

Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI?


  1. Selenium: How selenium identifies elements visible or not? Is is possible that it is loaded in DOM but not rendered on UI? I would like to verify a scenario where element is clickable, I know web drive has method "ElementToBeClickable" however, I would like to know the inner working. Please help me on this.
  2. Also,how to handle a scenario where the element is loaded in the DOM but UI shows loading in progress, how to wait for complete load?
  3. Please let me know, if the UI is not loaded then will selenium directly call the DOM element or if UI element is being loaded then it will fail the execution? I would really appreciate more technical explanation on this.

Solution

  • Here you can find a detailed discussion on Page load strategy


    Update

    As per your counter question here are the different stages of an WebElement and the respective ExpectedConditions to check the stages :

    Note : As per the docs Element is Clickable - it is Displayed and Enabled.