Works in Selenium RC Java 0.9.0 (Firefox 2.0):
1. selenium.open("
http://denverco.areaguides.net/");
2. selenium.isElementPresent("//a[.='Log Out']");
Broken in Selenium RC Java 0.9.2 (Firefox 2.0):
1. selenium.open("
http://denverco.areaguides.net/");
2. selenium.isElementPresent("//a[.='Log Out']");
Error:
com.thoughtworks.selenium.SeleniumException: ERROR: Selenium failure. Please report to the Selenium Users forum at
http://forums.openqa.org, with error details from the log window. The error message is: Permission denied to get property HTMLDocument.evaluate
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:154)
at com.thoughtworks.selenium.HttpCommandProcessor.getBoolean(HttpCommandProcessor.java:227)
at com.thoughtworks.selenium.DefaultSelenium.isElementPresent(DefaultSelenium.java:382)
at com.localmatters.qa.framework.mosaic.component.MosaicNavigationComponent.clickMyPlacesTab(MosaicNavigationComponent.java:56)
Thus, every element in the iframe belongs to another domain; so when Selenium iterates over all elements it also tries to access their properties - in case of the iframe's elements this is the classical violation of the cross-site scripting restrictions.
What you can do simplest is to use the *chrome instead of *firefox and the *iehta instead of *iexplore launcher types. By doing so Selenium has similar permissions as the browsers themselves, so you can also access properties of elements in the iframe.