Ok, I think I may have found the problem.

It appears that goBack does not always allow time for the DOM to be fully 
constructed[1].

If I place a pause of 250 ms AFTER a call to goBack, the test never 
fails[2].  If I remove the pause, the tests will eventually fail - usually 
within a step or two.

So, the fact that the failures are so spurious is down to, I guess, 
processor load at the instant of time that the step is executed.

Interestingly, something else I noticed since sending my first email... when 
FF fails, it always fails with an "Element not found" error, while IE always 
fails with "Access Denied" errors.  Either way, pauses fix the problem.

I'm writing Selenium.prototype.doUsrGoBack=function()  ... with a forced 
pause of 350 ms (just to be sure) right now ;)

Russ

[1] I'm intrigued to now how exactly Selenium knows when the browser is 
fully "ready"... and why it's not working in goBack.
[2] where "never" = thousands of sample runs in my dataset.

----- Original Message ----- 
From: "Russ Thomas" <[EMAIL PROTECTED]>
To: <selenium-users@lists.public.thoughtworks.org>
Sent: Wednesday, November 23, 2005 5:45 PM
Subject: [Selenium-users] spurious failures


Hi all,

I'm starting to ramp up my tests/testsuite and have noticed some strange
behaviours in Selenium.  Basically, "Access Denied" is returned from some
tests, while others return "Element x not found".  Both of these appear
"randomly" - for example, if I repeatedly run and rerun the same test (using
Run, Selected) I get a fail, then a pass then a fail... different failures
but typically one of the two mentioned.  Has anyone else seen this kind of
behaviour?

Server: IIS
IE6 and FF 1.5

To make things easier, I've pasted some lines from my test which sometimes
fail:

clickAndWait|divRecordDelivery|Element divRecordDelivery not found

This was in Firefox. Having run the test once, perfectly, I then reran it
and it fails with the error as above.  Anyone know why?  How can the element
exist and not exist?

TIA
Russ

_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users 

_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to