Skip to content

Instantly share code, notes, and snippets.

@alisterscott
Created June 13, 2012 12:17
Show Gist options
  • Save alisterscott/2923713 to your computer and use it in GitHub Desktop.
Save alisterscott/2923713 to your computer and use it in GitHub Desktop.
selenium webdriver user agent example
require 'selenium-webdriver'
require 'webdriver-user-agent'
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
driver.get 'http://tiffany.com'
driver.current_url.should == 'http://m.tiffany.com/International.aspx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment