This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2 Replies Last post: Oct 13, 2008 2:06 AM by Sharath  
madhav Beginner 6 posts since
Oct 8, 2008
Currently Being Moderated

Oct 10, 2008 6:27 AM

what is difference between this statements ?

Hi 

 

while creating browser object generally we use the statement as bellow...

 

browser = new DefaultSelenium("localhost",
            4444, "*firefox", http://www.google.com/);   ------1

and while opening the google website we use the statement as bellow

 

browser.open("http://www.google.com/webhp?hl=en");---------------------2

 

 

why not we use the same url in both statement like this http://www.google.com/

 

If we use the above url in both statement  we will get error like this " permission denied" why this is so

Tarun Expert 189 posts since
Apr 28, 2008
Currently Being Moderated
1. Oct 11, 2008 12:29 AM in response to: madhav
Re: what is difference between this statements ?

We should indeed use same url in both the places, if you don't use same url then you will encounter permission denided error.

Sharath Beginner 50 posts since
Nov 9, 2006
Currently Being Moderated
2. Oct 13, 2008 2:06 AM in response to: madhav
Re: what is difference between this statements ?

Hi Madhav,

 

Instaed of using browser = new DefaultSelenium("localhost", 4444, "*firefox", http://www.google.com/); use

browser = new DefaultSelenium("localhost", 4444, "*chrome", http://www.google.com/);

 

This should take care of the permission denied errror message. This is because of the same origin policy. Take a look at

http://selenium-rc.openqa.org/experimental.html

More Like This

  • Retrieving data ...