Search code examples
testingseleniumsame-origin-policy

Selenium testing over multiple domains


I'm pretty new at Selenium, recently I've created a bunch of tests with Selenium-IDE and I wanted to run them through a .bat script against a selenium stand alone server so I could test in IE, Firefox, etc.

When running the tests in firefox everything goes well and they pass... now Internet Explorer (8) is another story, the testsuite uses the localhost as domain to test against.

But here's the tricky part - I have a static content provider which runs on another domain than localhost where my images, css and javascript is hosted. How can I tell Selenium Server that it's ok to use multiple domains?

I know it is disabled because of same origin policy, however firefox runs it without problems, and showing the correct css rules and images.


Solution

  • Well you would need to Selenium Webdriver (or Selenium RC (older version)) to do all that you just listed.

    here is the page which will hep you get started.