Friday 15 January 2010

webdriver - setting request headers in selenium -


I am trying to set the request title 'referrer' to circumvent the incoming request from another site . We need a capacity test that uses a specific reference, which gives the user a special look, otherwise an alternate form is given.

I can do this within the poltergeist:

  page.driver.headers = {"Referrer" => Referer_string}   

But I can not get the same functionality for the sealium driver.

How can I set a request header in the Capebarra Selenium driver?

There is no API to do this in WebDrive. See the title of this issue for more information, that this feedback is about titles, but it was decided that the subject of this problem in Selenium would not include the API for request headings. Many issues have been marked as duplicates about adding APIs to set request headers:.,.

Here are some possibilities that I can offer:

  1. Use another driver /
  2. or some other proxy.
  3. I used to go with Option 3 in most cases. It's not hard to do.

    Note that this is not supported by other drivers.

No comments:

Post a Comment