Skip to content

Instantly share code, notes, and snippets.

@alisterscott
Created June 13, 2012 12:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alisterscott/2923721 to your computer and use it in GitHub Desktop.
Save alisterscott/2923721 to your computer and use it in GitHub Desktop.
watir webdriver user agent example
require 'watir-webdriver'
require 'webdriver-user-agent'
driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
browser = Watir::Browser.new driver
browser.goto 'tiffany.com'
browser.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