|
Any idea when this is going to be fixed? I also have this problem. In addition I also have problems using waitForPageToLoad in firefox. It might be related to the way we do the requests (click builds a form in a hidden frame which is submitted and has a target of the originating frame. I solved the problems by doing this session().getEval("selenium.browserbot.getCurrentWindow().document.selenium_dummy = 'reloading'"); Reduced priority as the issue has been reported about a nightly snapshot, which must not be stable. Furthermore, there are workarounds like waiting for a checkpoint element. This crops up consistently for me when running Selenium 1.0-beta1 on Linux. I'm using Firefox v2.0.0.17, Selenium server 1.0-beta1, PHP client libraries (with PHP v5.2.5), and JDK v1.6.0_10. Similar to previous posters, I can work around the issue with a sleep. This doesn't happen for me 100% of the time, but it happens frequently enough that my test cases don't work properly. I haven't observed the same issue when running under Windows, using the same version of Selenium, Java and Firefox. I had the same exact problem with Selenium 1.0 beta, under Vista. Here is an excerpt: selectFrame navbox I get: I dug onto this problem, and here are some remarks: 1) We can fix it by using the following function: and use 2) The problem appears when several pages are loaded simultaneously. 3) IMO, I think it's a bug in ReadyState.xpi, which correctly catches when a page is reloaded, but not when it's ready (I mean you can open the document.body). With the following code lines when using the latest snapshot I can't reproduce this issue: selenium = new DefaultSelenium("127.0.0.1", 5555, "*firefox", "http://www.google.at"); As some of you mentioned frames what about using waitForFrameToLoad()? I tried waitForPageToLoad, and waitForFrameToLoad, but they both fail. As I said, I have to run the test around 3 times to get an error, and the test has around 10 of such tricks. The waitFor/Condition logic in the Java client driver now caters for this (amongst other unexpected SeleniumExceptions). You won't need to code a manual sleep() operation as waitFor will do this functionality silently, and try to recover before timeout. If the wait/For stuff gets ported to PHP, Python etc, then other languages will see this too. I forgot to mention in my previous comment that we never ran into this problem when running selenium server 0.9.2 (and we had been running it for about a year). To everyone that is watching this issue: what mode are you running this in? Does it go away if you switch the mode to a different mode? Theirry - chrome mode should be fine, but can you try some of the other ones listed here: Particularly *firefoxproxy with and without -proxyInjectionMode turned on. @Pavel: Can you share your test? Any progress or movement on this? I'm also experiencing this issue with selenium rc 1.0.2 with ff 3.0.13 I'm seeing a different form of this error with rc 1.0.1 and FF 3.0.x. Instead I get lots of "X is undefined" errors during our tests using the waitForCondition() method. Cause it is an intermittent failure, it is hard to tell but I think it is when I use the *firefox mode (seems to be ok with *firefoxproxy). I also see this a lot in our automated build system and not as much running the tests locally during development. Like Thierry, we never saw this problem previously when we were on 0.9.2. We see this as well, running in both *firefox and *iexploreproxy modes. Our work-around has been to wrap IsTextPresent() and to call WaitForCondition("selenium.isElementPresent('document.body');", ...) first. It's a kludge, but it seriously reduces the random-failure count. Here is the workaround that we use in our user-extensions.js. Selenium.prototype.makePageLoadCondition = function(timeout) { catch(ex) { return false; } return this.browserbot.isNewPageLoaded(); Here's what we use: public static boolean isTextPresentSafe(String text) { /**
|
||||||||||||||||||||||||||||||||||||||||||||||||
I had this problem too.
Now I'm calling Thread.sleep(500) to solve this bug.