使用Watir时,"NameError:未初始化的常量UserAgent"

wim*_*wim 2 ruby selenium webdriver irb watir

我是新来的红宝石,我似乎已经成功安装watir-webdriverwebdriver-user-agent宝石,但是当我试图按照指示在这里我已经迷迷糊糊.如何进行?

>> 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>'
Run Code Online (Sandbox Code Playgroud)

Ale*_*ard 7

尝试使用 Webdriver::UserAgent