12

I've tried to run my tests with Selenium 2 and Firefox 19. One of this tests causes an error "ERROR: Command execution failure. The error message is: can't access dead object".

I'm reading about it, it seems like a bug in newest Firefox's versions. Lot of people have the same issue, but I've not found anything really clear.

Any heroe can help us? Maybe we just need to change something in "about:config"?

Regards

discostu
  • 291
  • 1
  • 5
  • 15
  • 1
    I doubt this is a bug, more likely that the ff engine evolves and selenium need some time to adapt. i had similar issues with selenium webdriver. i now use an "old" version of firefox for testing that I set up in a way that prevents it from auto-updating itself. – luksch May 06 '13 at 10:36
  • Thanks for the info, luksch. Your answer would be good for me, but unfortunately, I need to run it with Firefox 18-19-20. Thanks anyway – discostu May 06 '13 at 10:45
  • i read up on this now. it seems that ff changed this by design already in ff 15. according to https://blog.mozilla.org/addons/2012/09/12/what-does-cant-access-dead-object-mean/ it should be easy for an extension to adapt, but selenium did not follow it seems. can you move away from using the ff-extension and maybe use a webdriver based approach for testing? – luksch May 06 '13 at 11:00
  • What version of the IDE? – Arran May 06 '13 at 19:39
  • What kind of object is it trying to interact with, when it throws the _dead object_ error? Is the object disabled, or hidden, or made inaccessible by a div in front of it, or anything like that? – Vince Bowdren May 07 '13 at 12:00
  • Selenium IDE is 2.0.0. – discostu May 07 '13 at 14:34
  • I Think it happens when the page is reloaded – discostu May 07 '13 at 14:48
  • Mozilla people answered me. There's nothing we can do, it just Selenium isn't adapted to this kind of versions. "Best" option is go back to previous Firefox versions. – discostu May 08 '13 at 08:28
  • This problem isn't with an extension - because I get it running the tests with PHPUnit, or htmlsuite - the problem is selenium itself, but nobody seems to want to listen – Hippyjim Jun 25 '13 at 13:50

4 Answers4

21

I was desperate about the same Problem and didn't find any solution although many people seemed to have the same problem.

I solved it by calling

webDriver.switchTo().defaultContent();

before calling any findElement method (using Java)

cupiqi09
  • 311
  • 2
  • 7
6

This error generally comes when you do no switch back from frame and trying to access web elements directly. Use driver.switchTo().defaultContent(); and then try to access the elements

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Pravin Shinde
  • 61
  • 1
  • 2
0

I finally made a "cheat" to the browser.

I got the fail when Selenium clicked on a link and try to open the new page. What I've made is just simulate the click, doing a selenium.open("URL") which replace selenium.click("link=ButtonWhichOpenTheURL").

It seems to work by the moment

discostu
  • 291
  • 1
  • 5
  • 15
0

I am facing the same error on Firefox 23 while reopening a pop up browser window. The only workaround I did is closing the current selenium session and relaunching it again. It worked fine for me.