Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
haughtonomous
Posts : 1
Join date : 2013-06-12

Selenium will not see displayed screen even though browser displayes it - random error Empty 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
Code:
selenium.WaitForScreenToDisplay(30000);
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
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
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.
TIA
Back to top
Permissions in this forum:
You cannot reply to topics in this forum