Selenium Webdriver - set preferred browser language DE

前端 未结 4 1417
一生所求
一生所求 2021-01-21 19:45

I have a problem setting the preferred (accepted language) within headless Chrome using Selenium Webdriver and Ruby. I use the following WebDriver settings:

Sele         


        
4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-21 20:39

    For me works:

    options = Selenium::WebDriver::Firefox::Options.new
    options.add_preference("intl.accept_languages", 'de-DE')
    Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
    

提交回复
热议问题