Maven selenium selenese error: Unexpected Exception: Permission denied to get property Location.href
From Foochal
Contents |
[edit]
Error when trying to run maven selenium:selenese
I get the following error when running maven selenium:selenese
error: Caught an exception attempting to log location; this should get noticed soon! error: Unexpected Exception: Permission denied to get property Location.href
[edit]
Reason
This is due to the Mozilla Same origin policy which prevents document or script loaded from one origin from getting or setting properties of a document from a different origin.
[edit]
Solution
Change your pom configuration to use the startURL from the same origin as the URLs in your tests.
[edit]
The following config will fail
if the config is:
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <configuration> <browser>*firefox</browser> <suite>src/test/selenium/suite.html</suite> <startURL>http://startURL1.some.extension/</startURL> </configuration> </plugin>
but the tests refer to: http://startURL2.some.extension/
[edit]
The following config passes
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <configuration> <browser>*firefox</browser> <suite>src/test/selenium/suite.html</suite> <startURL>http://startURL3.some.extension/</startURL> </configuration> </plugin>
and the tests refer the same startURL: http://startURL3.some.extension/

