My webdriver-user-agent gem now supports random user agents. This idea belonged to Christoph Pilka who released the webdriver-user-agent-randomizer gem and suggested that we merge this feature back into the orginal gem.
Well, I have done it and now you can access this functionality like so:
require 'selenium-webdriver' require 'webdriver-user-agent' driver = UserAgent.driver(:agent => :random) driver.execute_script('return navigator.userAgent') # random agent like "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1"
See README for full details.