Selenium waitForDOMToLoad()?

574 views Asked by At

Selenium's open command implicitly waits for the whole page to load, including images, etc.

How do I just wait for the DOM to load, like jQuery's .ready() method?

Currently, I'm using waitForElementPresent, but is there a better alternative?

1

There are 1 answers

0
Rajasankar On

I think you may try to do the following

  1. Tweak the selenium source code to stop it raising page reloaded flag.
  2. Use custom command or getEval to check if the dom is loaded and proceed.