Display results as :

Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c


Alternate to getEval("window.document.readyState")

View previous topic View next topic Go down

Alternate to getEval("window.document.readyState")

Post by nilesh on Wed Nov 30, 2011 5:01 pm


Need a method that wait till my page is loaded(all images,texts and all). window.document.readyState(javascript method) waits till all DOM object is loaded. I searched on net and found out a method window.onload and window.load but it didn't work as it was returning null.

My Code: Selenium RC using PHP

$total_wait = 3;
$this->max_load_time = 120;

while($total_wait <= $this->max_load_time && $this->getEval("window.document.readyState") <> "complete")

In this case what happens is I get $this->getEval("window.document.readyState") == "complete" even before my objects like image and text is loaded because of which it doesn't enter into the loop and starts executing next statement(and eventually fail).

I don't want to use 'Sleep' as the page takes different amount of time to load.

Thanks in advance!!!!


Posts : 1
Join date : 2011-11-29

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum