Created
June 13, 2012 12:17
-
-
Save alisterscott/2923713 to your computer and use it in GitHub Desktop.
selenium webdriver user agent example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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