Our tests currently have a specific hostname in the url (e.g. http://foo.bar/whatever)
We want to resolve foo.barto a different IP when running the tests.
Manually, we will do this by changing the host file or using this piece of C # code:
var request = (HttpWebRequest)WebRequest.Create("http://ip-of-foobar/whatever");
request.Host = "foo.bar";
We need to have the correct hostname ... maybe there is another way to configure request headers in Selenium?
source
share