2

我是 ruby​​ 的新手,我似乎已经成功安装watir-webdriverwebdriver-user-agentgems,但是当我尝试按照这里的说明进行操作时,我偶然发现了。如何进行?

>> 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>'
4

1 回答 1

7

尝试使用Webdriver::UserAgent

于 2013-03-07T01:06:34.600 回答