When running the selenium script of a website I got the following error
com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://www.website.com.au/ Response_Code = 400 Error_Message = Bad Request.
The solution was pretty simple. Instead of using the url http://www.website.com.au/ change it to http://website.com.au/. Remove the www.
The reason is because there is no 301 re-direct is not setup for the website.
Originally the setup was – setUp(“http://www.website.com.au/”, “*chrome”);
Changed it to – setUp(“http://website.com.au/”, “*chrome”);