We are doing some automation using Selenium (for Firefox) and recorded a script to playback. This was working fine until the provider roled out some new changes. Now we get the following error, not sure what this means…
[info] Executing: |waitForPopUp | LookuphdnProductId1 | 40000 |
-->[error] Permission denied for <https://books.zoho.com> to get property HTMLDocument.readyState
[info] Executing: |selectWindow | name=LookuphdnProductId1 | <br/>
-->[error] Unexpected Exception: fileName -> chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js, lineNumber -> 840
Anybody with experience in browser automation or Selenium throw some hints?
Thanks
via this blogpost and Selenium FAQ:
It’s basically a problem with Same origin policy which is a design limitation of Selenium RC (and therefore also of Selenium IDE). The thing is that Selenium runs all your commands as Javascript – and Javascript can’t be run cross-domain. But you obviously change the domain somewhere in the test.
Don’t you somewhere try to open an address like this:
http://www.somedomain.com/link=www.google.com? If yes, you might want to openhttp://google.comright away. If you were clicking on a link with such a href, try to dig the link out and open the url “manually” in the script. Or use Firefox with some addon that does it for you, I’ve seen some.If there’s just a redirect to another website/domain, then you’re in a pickle. If you start on
foo.comand are redirected via some link tobar.orgthen you must not use theandWaitcommand and openbar.orgagain manually in the script (so it runs on that domain and has the right access rights).By the way, Selenium 2 (WebDriver) doesn’t have this limitation.