Selenium - don't wait until all elements are presented

余生颓废 提交于 2019-12-06 03:33:23

Selenium works on a copy of the page's source so it try to wait until the DOM represents what will be the page's full source. For this to work correctly selenium is bases on the document.readyState:

  • uninitialized, loading, loaded (waiting)
  • interactive, complete (working).

this behavior is mandatory for work, otherwise the next scenarios might occur and break tests:

  1. Ajax requests that do not return.
  2. Accessing unready elements might cause stale element exceptions.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!