I used the following workaround for Chrome, and it worked for me. You
basically need to pass the '--disable-web-security' flag to the
GoogleChromeLauncher class. One option is to modify source code and
rebuild the selenium-server.jar, but an easier approach is to set a
commandLine flag on a BrowserConfigurationOptions object and pass that
to selenium.start()
For example,
DefaultSelenium selenium = new DefaultSelenium(location, port,
browser, targetPath);
BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
selenium.start(bco.setCommandLineFlags("--disable-web-security"));