Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the Selenium way of thinking, this should not be something that you should do anything for. Your test code should mimic user behavior. The Selenium driver should connect you up to the browser and the browser (be it Firefox, Chrome or SimpleBrowser) should automatically add the Host header. Always actually. <strike>We should incorporate this in the default headers SimpleBrowser adds.</strike></p> <p><strike>As a workaround, SimpleBrowser has a SetHeader() method that you could use to add any headers you need. You can instantiate the driver passing in a specific version of the Browser as a parameter, so you could call the SetHeader method at the right time.</strike></p> <p><strike>But really, we should fix this in SimpleBrowser itself. <a href="https://github.com/axefrog/SimpleBrowser/pull/60" rel="nofollow">https://github.com/axefrog/SimpleBrowser/pull/60</a></strike></p> <p>On some further inspection: SimpleBrowser does this just fine. If you navigate to a Url (ie. <a href="http://www.asldkfhjawoeij.com/" rel="nofollow">http://www.asldkfhjawoeij.com/</a>), it will automatically add the Host header to the request. What you ask for is incorrect behavior for a web browser. If the server is expecting a host header for a specific site on the IP address, you should use Selenium/SimpleBrowser to do from code exactly what you would do from a normal browser. Entering a full URL with domain names. Not adding fake headers.</p> <p>If your problem is that the host name is not (yet) known in the DNS, you might set up your test runner environment to fake this. You could add it to your local DNS or to your host file (<a href="http://en.wikipedia.org/wiki/Hosts_(file)" rel="nofollow">http://en.wikipedia.org/wiki/Hosts_(file)</a>).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload