我是ruby的新手,我似乎已经成功安装了watir-webdriver
和webdriver-user-agent
宝石,但当我试图按照说明here时,我偶然发现了。怎么办?
>> 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>'
答案 0 :(得分:7)
尝试使用Webdriver::UserAgent