0 Replies Last post: Dec 24, 2008 4:26 PM by Joe Hennessey  
Joe Hennessey Beginner 6 posts since
Nov 5, 2008
Currently Being Moderated

Dec 24, 2008 4:26 PM

Popup window failure with Selenium: Permission denied to set property Window.seleniumWindowName

I am familiar with the techniques offered by Selenium to access "child" windows (waitForPopUp or openWindow/selectWindow), and have successfully run tests using them.  However, I'm seeing a new type of failure in my latest attempts.  Note that in the situations where I've succeeded, the popup windows come up displaying URLs from the same web server (http://xxx.somedomain.com/...) while the failing one is a different one (http://yyy.somedomain.com/...).  I'm hoping that doesn't make it impossible to use selenium to test the popup window.  Also, please be aware that the "foreign" window DOES come up.  It's just that Selenium fails on its attempt to focus on it.

 

In any event, here's the code segment where the failure occurs.....

 

            .

            .

            .

            selenium.click("link=public calendar");

            Thread.sleep(2000);

            focusOnChildWindow("monthEventCalendarWindow");    ß------------------ failure point (top level)

 

 

protected void focusOnChildWindow(String windowId) {

selenium.openWindow("", windowId);  ß------------------ failure point in calendar scenario only (works elsewhere)

selenium.selectWindow("name="+windowId);

    }

 

Here's the dump (I was running Firefox 3.0.5):

 

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 set property Window.seleniumWindowName
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
    at com.thoughtworks.selenium.DefaultSelenium.openWindow(DefaultSelenium.java:238)
    at com.roving.evp.test.selenium.Sprint36Tests.testRegistrantPayByCreditCardPaypal(Sprint36Tests.java:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at junit.framework.TestCase.runTest(TestCase.java:164)
    at junit.framework.TestCase.runBare(TestCase.java:130)
    at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:71)
    at junit.framework.TestResult$1.protect(TestResult.java:106)
    at junit.framework.TestResult.runProtected(TestResult.java:124)
    at junit.framework.TestResult.run(TestResult.java:109)
    at junit.framework.TestCase.run(TestCase.java:120)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 

Thanks in advance for your help. 

 

jph

More Like This

  • Retrieving data ...