SimpleBrowserDotNet / SimpleBrowser.WebDriver

A webdriver for SimpleBrowser
Apache License 2.0
43 stars 16 forks source link

Can I change the value of the host header? #14

Closed jbuedel closed 11 years ago

jbuedel commented 11 years ago

I want to test against a web site set up in IIS with proper bindings to a domain, but that domain does not actually exist in dns. Without modifying my hosts file.

Here is the equivalent, using a raw WebRequest:

var req = (HttpWebRequest)WebRequest.Create("http://204.144.122.223");
req.Host = "www.asldkfhjawoeij.com";
Console.WriteLine(req.GetResponse().GetResponseStream().ReadToEnd());

I posted a SO question as well.

Thanks, Josh

Teun commented 11 years ago

I have answered your q on SO. I've created a pull request with SimpleBrowser to correct this behavior. Once that is pulled, I'll have to create a new nuget release for the driver.

Teun commented 11 years ago

I have added an explanation in the StachOverflow answer. TLDR: I think Selenium clients should not allow this. It is the kind of thing that a browser doesn't do.