The reason for this error goes by many names:
"Same origin policy"
"JavaScript security"
"Cross site scripting"

Basically, it means you can't have Selenium running on localhost (or the 
filesystem) and test yahoo or google, unless you "turn off" or workaround 
the security in the browser that prevents you from performing your test. 
This is especially confusing since JavaScript let you load a foreign site 
(yahoo.com) initially in the TestRunner, but JavaScript has no power to do 
anything with that foreign site's page unless the "same origin policy" has 
been met.

On Windows, with IE, you can get effectively "turn off" JavaScript 
security by running the TestRunner as an HTA application. (This is a 
Windows/IE only solution). Here's a good "how to" that'll get you 
up-to-speed:
http://lists.public.thoughtworks.org/pipermail/selenium-users/2005-October/001121.html

You can view the entire thread about the "how to" guide here:
http://lists.public.thoughtworks.org/pipermail/selenium-users/2005-October/thread.html
(scroll down to the bottom of the page to see the complete thread)

You can do similar things with the Selenium Recorder extension for 
Firefox. It can be run as a "chrome" application and thus removes the 
security enforced upon JavaScript in the browser in a similar fashion to 
how the HTA works. However, this approach with the Recorder has not been 
documented. Since you're just starting out with Selenium, go with the HTA 
approach for now.

-Jason
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to