- haughtonomous
- Posts : 1
Join date : 2013-06-12
Selenium will not see displayed screen even though browser displayes it - random error
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
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
TIA
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
- Code:
selenium.WaitForScreenToDisplay(30000);
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
- Code:
selenium.Open(GetRestartPageURL());
selenium.WaitForPageToLoad("30000");
selenium.Click("Button");
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
TIA
- Selenium.SeleniumException : Failed to start new browser session: Error while launching browser
- Could not start Selenium session: Failed to start new browser session: Error while launching browser
- How can I get the XML document source displayed in browser using selenium
- How find any text in browser screen and click on it?
- Error message being displayed while running a code in Java (JUnit4) in selenium Rc .
Permissions in this forum:
You cannot reply to topics in this forum