module Actir::Webdriver::Devices
Public Instance Methods
agent_string_for(device)
click to toggle source
# File lib/actir/webdriver/devices.rb, line 16 def agent_string_for(device) device = (device ? device.downcase : :iphone) user_agent_string = devices[device][:user_agent] raise "Unsupported user agent: '#{device}'." unless user_agent_string user_agent_string end
devices()
click to toggle source
# File lib/actir/webdriver/devices.rb, line 7 def devices Actir::Config.get_content(config_file) end
resolution_for(device_name, orientation)
click to toggle source
# File lib/actir/webdriver/devices.rb, line 11 def resolution_for(device_name, orientation) device = devices[device_name.downcase][orientation.downcase] [device[:width],device[:height]] end
Private Instance Methods
config_file()
click to toggle source
# File lib/actir/webdriver/devices.rb, line 25 def config_file File.join(Pathname.new(File.dirname(__FILE__)).realpath, "config/devices.yaml") end