Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/101213
Change subject: Fix Accept-Language feature[1] for PhantomJS ...................................................................... Fix Accept-Language feature[1] for PhantomJS 1: https://github.com/wikimedia/mediawiki-extensions-UniversalLanguageSelec tor/blob/master/tests/browser/features/accept_language.feature Bug: 49813 Change-Id: Ib398ef439fda4307b266de03493a8947695a95a4 --- M lib/mediawiki/selenium/env.rb 1 file changed, 9 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium refs/changes/13/101213/1 diff --git a/lib/mediawiki/selenium/env.rb b/lib/mediawiki/selenium/env.rb index e6a2f1a..2ea9a22 100644 --- a/lib/mediawiki/selenium/env.rb +++ b/lib/mediawiki/selenium/env.rb @@ -46,13 +46,19 @@ else if browser_label == :firefox profile = Selenium::WebDriver::Firefox::Profile.new + profile["intl.accept_languages"] = language + Watir::Browser.new browser_label, profile: profile elsif browser_label == :chrome profile = Selenium::WebDriver::Chrome::Profile.new + profile["intl.accept_languages"] = language + Watir::Browser.new browser_label, profile: profile + elsif browser_label == :phantomjs + capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs + capabilities['phantomjs.page.customHeaders.Accept-Language'] = language + Watir::Browser.new browser_label, desired_capabilities: capabilities else - raise "Changing default language is currently supported only for Firefox and Chrome!" + raise "Changing default language is currently supported only for Chrome, Firefox and PhantomJS!" end - profile["intl.accept_languages"] = language - Watir::Browser.new browser_label, :profile => profile end end def sauce_api(json) -- To view, visit https://gerrit.wikimedia.org/r/101213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib398ef439fda4307b266de03493a8947695a95a4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/selenium Gerrit-Branch: master Gerrit-Owner: Zfilipin <zfili...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits