Iehta "Permission Denied" or "Access Denied" when changing domain

204 views
Skip to first unread message

IncQA

unread,
Oct 23, 2008, 11:56:41 AM10/23/08
to selenium-users...@googlegroups.com
In a test we have to change domains.  I.e. we start the test on http://test-server/, but eventually we have to run a selenium.Open("http://externalserver.com/product.aspx") to simulate a external link.

I think the crux of the matter is outlined in the server output, where, when we call selenium.Open it outputs

you appear to be changing domains from http://test-server to http://externalserver.com/registration/login.html\\ this may lead to a 'Permission denied' from the browser (unless it is running as *iehta or *chrome,\\ or alternatively the selenium server is running in proxy injection mode)

If I use *iexplore the test fails immediately when I switch domains with "Permission Denied", if I use *iehta then the test doesn't fail but when I return to the original domain I get a manual javascript error popup saying Access denied, which obviously defeats the the object of an automated test.  Confusingly, when the test is ran under *chrome there are no problems.

I've tried proxy injection, avoidproxy, multiwindow, and no joy.

Apologies for going over well-trodden ground but I've been searching here and googling my proverbial off for hours and have gotten nowhere.

Any help is appreciated

Iehta server log follows:

C:\Selenium RC\selenium-remote-control-0.9.2\selenium-server-0.9.2>java -jar selenium-server.jar -forcedBrowserMode *iehta\\ 16:35:46.302 INFO - Java: Sun Microsystems Inc. 10.0-b23\\ 16:35:46.302 INFO - OS: Windows XP 5.1 x86\\ 16:35:46.302 INFO - v0.9.2 [2006], with Core v0.8.3 [1879]\\ 16:35:46.302 INFO - "*iehta" will be used as the browser mode for all sessions, no matter what is passed to getNewBrowserSession.\\ 16:35:46.429 INFO - Version Jetty/5.1.x\\ 16:35:46.429 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]\\ 16:35:46.429 INFO - Started HttpContext[/selenium-server,/selenium-server]\\ 16:35:46.429 INFO - Started HttpContext[/,/]\\ 16:35:46.445 INFO - Started SocketListener on 0.0.0.0:4444\\ 16:35:46.445 INFO - Started org.mortbay.jetty.Server@1bf73fa\\ 16:35:53.692 INFO - Checking Resource aliases\\ 16:35:53.708 INFO - Command request: getNewBrowserSession[*chrome, http://testserver] on session null\\ 16:35:53.708 INFO - overriding browser mode w/ forced browser mode setting: *iehta\\ 16:35:53.819 INFO - Launching session 153708\\ 16:35:54.502 INFO - Launching Embedded Internet Explorer...\\ 16:35:55.551 INFO - Launching Internet Explorer HTA...\\ 16:36:19.229 INFO - Allocated session 153708 for http://testserver\\ 16:36:19.261 INFO - Got result: OK,153708 on session 153708\\ 16:36:19.341 INFO - Command request: open[http://testserver/ihsti/index.aspx, ] on session 153708\\ 16:36:22.694 INFO - Got result: OK on session 153708\\ 16:36:22.694 INFO - Command request: isElementPresent[Username, ] on session 153708\\ 16:36:22.726 INFO - Got result: OK,true on session 153708\\ 16:36:22.742 INFO - Command request: type[Username, terry] on session 153708\\ 16:36:22.757 INFO - Got result: OK on session 153708\\ 16:36:22.757 INFO - Command request: isElementPresent[Password, ] on session 153708\\ 16:36:22.789 INFO - Got result: OK,true on session 153708\\ 16:36:22.789 INFO - Command request: type[Password, terry] on session 153708\\ 16:36:22.821 INFO - Got result: OK on session 153708\\ 16:36:22.821 INFO - Command request: isElementPresent[Submit, ] on session 153708\\ 16:36:22.837 INFO - Got result: OK,true on session 153708\\ 16:36:22.837 INFO - Command request: click[Submit, ] on session 153708\\ 16:36:22.869 INFO - Got result: OK on session 153708\\ 16:36:22.869 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:36:32.324 INFO - Got result: OK on session 153708\\ 16:36:32.324 INFO - Command request: getTitle[, ] on session 153708\\ 16:36:32.340 INFO - Got result: OK,Product List on session 153708\\ 16:36:32.356 INFO - Command request: isElementPresent[link=UK - The  Information Service, ] on session 153708\\ 16:36:32.388 INFO - Got result: OK,true on session 153708\\ 16:36:32.388 INFO - Command request: isElementPresent[//img[@alt='UK - The  Information Service'], ] on session 153708\\ 16:36:32.404 INFO - Got result: OK,true on session 153708\\ 16:36:32.404 INFO - Command request: click[link=UK - The  Information Service, ] on session 153708\\ 16:36:32.451 INFO - Got result: OK on session 153708\\ 16:36:32.451 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:36:37.680 INFO - Got result: OK on session 153708\\ 16:36:37.680 INFO - Command request: getTitle[, ] on session 153708\\ 16:36:37.743 INFO - Got result: OK,The  Information Service - Home on session 153708\\ 16:36:37.743 INFO - Command request: getTitle[, ] on session 153708\\ 16:36:37.775 INFO - Got result: OK,The  Information Service - Home on session 153708\\ 16:36:37.775 INFO - Command request: isElementPresent[//img[@alt='logo'], ] on session 153708\\ 16:36:37.791 INFO - Got result: OK,true on session 153708\\ 16:36:37.807 INFO - Command request: getAttribute[//*[@id="frBlock2"]/div[6]/div[2]/a[1]/@onclick, ] on session 153708\\ 16:36:40.683 INFO - Got result: OK,function anonymous()\\ {\\ document.frmemap3.submit();\\ } on session 153708\\ 16:36:40.683 INFO - Command request: getAttribute[//*[@id='frmemap3']/@action, ] on session 153708\\ 16:36:40.794 INFO - Got result: OK,http://www.cnplus.co.uk/registration/login.html on session 153708\\ 16:36:40.794 INFO - Command request: getLocation[, ] on session 153708\\ 16:36:40.810 INFO - Got result: OK,http://testserver/c/default.aspx?x&authcode=27E967B on session 153708\\ 16:36:40.826 INFO - Command request: open[http://externalserver.com/registration/login.html, ] on session 153708\\ 16:36:40.826 WARN - you appear to be changing domains from http://testserver to http://externalserver.com/registration/login.html\\ this may lead to a 'Permission denied' from the browser (unless it is running as *iehta or *chrome,\\ or alternatively the selenium server is running in proxy injection mode)\\ 16:36:45.006 INFO - Got result: OK on session 153708\\ 16:36:45.006 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:36:45.022 INFO - Got result: OK on session 153708\\ 16:36:45.022 INFO - Command request: getTitle[, ] on session 153708\\ 16:36:45.053 INFO - Got result: OK,Sign in Page on session 153708\\ 16:36:45.053 INFO - Command request: open[http://testserver/c/default.aspx?x&authcode=27E967B, ] on session 153708\\ 16:36:48.629 INFO - Got result: OK on session 153708\\ 16:36:48.629 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:36:48.645 INFO - Got result: OK on session 153708\\ 16:36:48.645 INFO - Command request: isElementPresent[link=Log out, ] on session 153708\\ 16:36:48.724 INFO - Got result: OK,true on session 153708\\ 16:36:48.724 INFO - Command request: click[link=Log out, ] on session 153708\\ 16:37:00.103 INFO - Got result: OK on session 153708\\ 16:37:00.103 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:37:02.788 INFO - Got result: OK on session 153708\\ 16:37:02.788 INFO - Command request: getTitle[, ] on session 153708\\ 16:37:02.868 INFO - Got result: OK,The  Information Service - Logout on session 153708\\ 16:37:02.868 INFO - Command request: getTitle[, ] on session 153708\\ 16:37:02.915 INFO - Got result: OK,The  Information Service - Logout on session 153708\\ 16:37:02.915 INFO - Command request: isTextPresent[Are you sure you want to log out?, ] on session 153708\\ 16:37:02.979 INFO - Got result: OK,true on session 153708\\ 16:37:02.979 INFO - Command request: isElementPresent[ctl00_body_hypLogout, ] on session 153708\\ 16:37:03.027 INFO - Got result: OK,true on session 153708\\ 16:37:03.027 INFO - Command request: click[ctl00_body_hypLogout, ] on session 153708\\ 16:37:03.647 INFO - Got result: OK on session 153708\\ 16:37:03.662 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:37:03.901 INFO - Got result: OK on session 153708\\ 16:37:03.901 INFO - Command request: getLocation[, ] on session 153708\\ 16:37:03.933 INFO - Got result: OK,http://testserver/scripts/tilogon.dll?AuthCode=27E967B&ReqCode=LOGOFF on session 153708\\ 16:37:03.933 INFO - Command request: waitForPageToLoad[90000, ] on session 153708\\ 16:37:08.636 INFO - Got result: OK on session 153708\\ 16:37:08.636 INFO - Command request: isTextPresent[You have been successfully logged off, ] on session 153708\\ 16:37:08.652 INFO - Got result: OK,true on session 153708\\ 16:37:08.684 INFO - Command request: testComplete[, ] on session 153708\\ 16:37:09.002 INFO - Got result: OK on session 153708

Reply all
Reply to author
Forward
0 new messages