Selenium : Permission denied <url> to get property Location.href

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Selenium : Permission denied <url> to get property Location.href

Ganesh
Hi

Permission denied for <http://abc.com> to get property Location.href

I received this error message when i tried to click a link called "cart"

current location (url) -> http://abc.com
when selenium.click("link=cart"); is triggered then it would traverse to http://secure.abc.com/store/cart

How to handle this ?

Can anyone help me out

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: Selenium : Permission denied <url> to get property Location.href

softwaretestingforum
Administrator
Hi Ganesh,

If you are using Firefox then try *chrome (remember it is not Google Chrome, it is FF mode with enhanced security privileges) when create instance of DefaultSelenium object
If on IE then use *iehta.

I wish you had posted a short version of your code also.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Selenium : Permission denied <url> to get property Location.href

Ganesh
Hi Tarun

First of all i would like to thank u v much 4 u r immediate reply.

I have tired using *chrome
but still it produces the  error Permission denied to access property 'document'

Here is my code

        selenium = new DefaultSelenium("localhost",4444,"*chrome","http://www.abc.com");
        selenium.start();  
        selenium.setSpeed("5000");
        selenium.open("/");
        selenium.click("xpath=(//a[contains(text(),'See All Languages')])[3]");
        selenium.waitForPageToLoad("30000");
        selenium.click("xpath=(//a[contains(text(),'English (American)')])[2]");
        selenium.click("link=cart"); ->  it produces the error while executing this stmt,  actually this link ll take us from http://www.abc.com to http://secure.abc.com
           
       
Reply | Threaded
Open this post in threaded view
|

Re: Selenium : Permission denied <url> to get property Location.href

softwaretestingforum
Administrator
Hi Ganesh,

I have two pointers -

1. After clicking on link - "xpath=(//a[contains(text(),'English (American)')])[2]", you need to bring control on the second window. You can do this by using title of the second window and executing method - selenium.selectWindow("titleOfWindow")
And then you should be able to continue with execution on new window.

2. In general about permission denied error, You may encounter them many a times with Selenium 1. So if you have just begun with Selenium 1 then I would suggest you to safely move to Selenium 2.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Selenium : Permission denied <url> to get property Location.href

tulsi.tester
In reply to this post by Ganesh
Hi,

One of the reason to get this type of error message is trying to act on the UI elements which are not loaded or no longer available. we will get these type of error message with AJAX pages.