Sha256: 9ab2e8d980513ced87f7d8853ae461a8eb9cda711ec7b72f2a4ad47959233bfe
Contents?: true
Size: 970 Bytes
Versions: 19
Compression:
Stored size: 970 Bytes
Contents
module MediawikiSelenium module BrowserFactory # Constructs new Phantomjs browser instances. The following configuration is # supported. # # - browser_http_proxy # - browser_language # - browser_user_agent # # @see Base # class Phantomjs < Base configure(:browser_http_proxy) do |http_proxy, options| options[:desired_capabilities]['phantomjs.cli.args'] << "--proxy=#{http_proxy}" end configure(:browser_language) do |language, options| options[:desired_capabilities]['phantomjs.page.customHeaders.Accept-Language'] = language end configure(:browser_user_agent) do |user_agent, options| options[:desired_capabilities]['phantomjs.page.settings.userAgent'] = user_agent end protected def default_browser_options super.tap do |options| options[:desired_capabilities]['phantomjs.cli.args'] = [] end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems