Firefox bug with Selenium - Can't access dead object

discostu picture discostu · May 6, 2013 · Viewed 13.2k times · Source

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

Answer

cupiqi09 picture cupiqi09 · Dec 19, 2016

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)