IE driver thinks document.readyState is not complete for each click made

601 views
Skip to first unread message

OxygeneIV

unread,
Oct 10, 2013, 5:31:33 AM10/10/13
to webd...@googlegroups.com
Hi,

got an issue with the IEdriverServer. (latest versions of everything, testing IE 9)

If I click a button or even a static text on the front page of our application, the IE driver thinks the readyState is not complete, and hangs forever, at least if we look at the driver logfile:

D 2013-10-10 10:50:46:358 Browser.cpp(399) Navigate Events Completed.
D 2013-10-10 10:50:46:561 Browser.cpp(438) Waiting for document to complete...
D 2013-10-10 10:50:46:869 Browser.cpp(460) readyState is not complete. 
...

Also doing switchTo() to the same window makes the log produce the same results and the automation seems to hang on the readyState check.

If I use the "Action" - method it works fine to click, but that might be just because of no check of the readyState after clicking, I don't know...

If I use javascript to check the document.readyState property it says "complete", only the driver thinks the state is different.

I've also tested setting a small value of the PageLoad-timeout prior to the clicking but that is quite a bad workaround to stop the driver
checking for readyState.

I've attached the click part from the IE driver logs for Action vs Click() where we can see that the click is made at the same physical position, using SendMessage. The difference is the readystate isssue for Click().

Does anyone know what could cause the driver to think the readyState != complete ?

/Magnus




Actions_vs_click_IE_driverServer.txt

OxygeneIV

unread,
Oct 10, 2013, 7:16:24 AM10/10/13
to webd...@googlegroups.com

Found this that seems to be fixing a similar issue for IEdriver (but not IEDriverServer ??)

Jim Evans

unread,
Oct 10, 2013, 8:13:03 AM10/10/13
to webd...@googlegroups.com
The difference between calling the click() method on a WebElement, and using the Actions class, is that the WebElement method does indeed imply an attempt to wait for the subsequent page to load. As for document.readyState, there are a couple of other conditions that may be causing the document to appear not fully loaded, even though the log implies readyState is the only possible cause. I've just committed a change that calls out the individual causes of this particular failure scenario, and you can retrieve the prebuilt binary from the repository[1]. This won't change the behavior of the driver, but it might shed a little more light on what the driver is actually seeing.

--Jim

[1] http://selenium.googlecode.com/git/cpp/prebuilt/Win32/Release

OxygeneIV

unread,
Oct 10, 2013, 10:35:51 AM10/10/13
to webd...@googlegroups.com
Hmm. my post went away in space..

Thanks Jim.

Got as expected , interactive, and the click() hangs forever as the driver expects 'completed'.

D 2013-10-10 16:23:14:584 Browser.cpp(482) document.readyState is not 'complete'; it was interactive

The page is a dijitPane page (dojo) , simulating tabs one could say, where an individual tab is made visible via a toolbar button.

The page is 100 % idle when I look at it at least.

/Magnus

OxygeneIV

unread,
Oct 11, 2013, 5:48:31 AM10/11/13
to webd...@googlegroups.com
OK, interesting testing today.

(Below is text by me non-dev,  but got the info talking to dev here)

We have introduced a notification mechanism for the page using "jquery signalR", which 
creates an IFrame. We looked into the js-file (think it was a js-file).

When disabling all signalling /notification , the Page-Complete-problem disappeared !

So, the jquery signalR - stuff seems to be the problem.

Also got info from another dev that one could do things with the frame via css. Perhaps change
some properties of the frame that makes the Page-Complete check pass.

But best would be to make the Page-Complete check handle the jquery signalR frame if that is possible.

Well, at least we now know the reason.

OxygeneIV

unread,
Oct 14, 2013, 7:26:00 PM10/14/13
to webd...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages