wim
wim

Reputation: 362557

"NameError: uninitialized constant UserAgent" when using Watir

I'm new to ruby, I seem to have successfully installed watir-webdriver and webdriver-user-agent gems, but when I was trying to follow the instructions here I've stumbled. How to proceed?

>> require 'watir-webdriver'
=> true
>> require 'webdriver-user-agent'
=> true
>> driver = UserAgent.driver(:browser => :chrome, :agent => :iphone, :orientation => :landscape)
NameError: uninitialized constant UserAgent
    from (irb):3
    from /usr/bin/irb:12:in `<main>'

Upvotes: 2

Views: 2085

Answers (1)

Alex.Bullard
Alex.Bullard

Reputation: 5563

Try using Webdriver::UserAgent

Upvotes: 7

Related Questions