History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-399
Type: Bug Bug
Status: Closed Closed
Resolution: Not a problem
Priority: Major Major
Assignee: Andras Hatvani
Reporter: Powers Foss
Votes: 3
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

0.9.2: Permission denied to get property HTMLDocument

Created: 13/Dec/07 10:29 AM   Updated: 22/Nov/08 11:11 AM
Component/s: Client Driver - Java
Affects Version/s: 0.9.2
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: http://denverco.areaguides.net/, Selenium RC 0.9.2, Firefox 2.0


 Description  « Hide
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)


 All   Comments   Work Log   Change History      Sort Order:
Andras Hatvani - 22/Nov/08 11:11 AM
The permission denied error is a correct one, because you embedded (at least) one iframe with the source domain www.traveladvertising.com, which differs from the base domain denverco.areaguides.net.
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.