views:

462

answers:

2

SeleniumException: ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: Permission denied.

Although my test runs perfectly in Firefox and also in IE when running in Debug mode, in IE in Run mode it fails with the error message above. selenium.waitForPageToLoad("20000"); doesn't seem to be a solution.

Any other ideas?

A: 

I used Thread.currentThread().sleep(1000); after the action that requires time to reload parts of the page. It seems to work, but not in all of the cases.

ratzusca
The problem there is that sometimes 1 second isn't enough, and sometimes it's too much. The former will cause false negatives, and the latter will cause your tests to take longer than they need to.
Dave Hunt
+1  A: 

What command is failing with the Permission Denied? It may be when trying to access something that doesn't exist yet. I would recommend using the waitForCondition command to ensure the target element is present/visible before attempting to interact with it.

Dave Hunt