Please tell me how to change Override the default HTTP Accept-Language header. in watir?

    1 answer 1

    It does not work out that way. Watir emulates a browser, not HTTP requests. If you need to change browser settings, such as preferred languages, this is done using profiles , and depends on the browser used. For example, for Chrome :

    profile = Selenium::WebDriver::Chrome::Profile.new profile['intl.accept_languages'] = "en" b = Watir::Browser.new :chrome, :profile => profile 
    • Here is the error that results in <code> F, [2013-12-26T09: 14: 01.761905 # 5634] FATAL -: Selenium :: WebDriver :: Error :: UnknownError chrome option: profile (Driver info: chromedriver = 2.7.236843, platform = Linux 3.2.0-56-generic x86_64)): </ code> - Alexandru
    • @Alexandru What are gem versions? - pirj