Display results as :

Rechercher Advanced Search


Selenium will not see displayed screen even though browser displayes it - random error

View previous topic View next topic Go down

Selenium will not see displayed screen even though browser displayes it - random error

Post by haughtonomous on Wed Jun 12, 2013 10:42 pm

I have cross-posted this from Stack Overflow, in the hope that someone here may be able to help.

I have a fairly large set of Selenium tests (about 180), which have worked very well over a long period on XP and Win7 32/64bit machines.
Recently, after a Windows 7 update (which may be coincidental), the tests have become unreliable. They fail at random, but always with the same problem - an expected screen is displayed but the WaitForPageToLoad() method does not return to confirm this. This does not occur on the XP machines, only the recently updated Win7 machines.
Platform: Win7, 32 and 64bit, Selenium 1.0 and 2.33.0 (no difference in behaviour), VS2008, browser IE9.
Scenario: A test initially displays a 'restart' screen with a single button, clicks on the button which should launch a login screen (all the tests go through the same code to do this). The login screen is displayed in the browser but the test line
does not return so the test times out with an error message. The tests will fail in this way completely at random - about half of them fail, but not consistently the same ones.
The application itself behaves perfectly when a human being interacts with the browser. The selenium logs don't give much in the way of clues - the last line is always 'waiting for page', eg "....Command request: waitForPageToLoad[30000,... ]".

Stepping through the test in the VS debugger never reproduces the problem.

The actual code where the problem manifests itself is

    selenium.WaitForPageToLoad("30000"); <-- this is where it times out even though the expected screen that is launched by "Button" is now displayed in the browser
Is there a known problem, or a workaround for this? Is it an issue with IE9 and Selenium 1.0? It's come out of the blue at a critical time.


Posts : 1
Join date : 2013-06-12

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