I am using Selenium and SimpleBrowser to do some headless browser testing of my website. I want to manually set the 'host' entry in all the requests. This is so I can have an instance of IIS set up with bindings to a domain name that does not actually exist in dns.
I want to do exactly this (which works):
var req = (HttpWebRequest)WebRequest.Create("http://204.144.122.223");
req.Host = "www.asldkfhjawoeij.com";
Console.WriteLine(req.GetResponse().GetResponseStream().ReadToEnd());
But using Selenium and SimpleBrowser. Where in the code below do I override the host header, if I even can?
[Test]
[TestCase("https://204.144.122.223.com/")]
public void CanGetHomepageAndVariousOtherUrls(string server)
{
using (var browser = new SimpleBrowserDriver())
{
browser.Url = server;
browser.FindElement(By.Id("home"));
}
}