Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 已创建的函数:concat。Watir webdriver,ChromeDriver 2.2,移动用户代理_Ruby_Cucumber_Watir_Selenium Chromedriver - Fatal编程技术网

Ruby 已创建的函数:concat。Watir webdriver,ChromeDriver 2.2,移动用户代理

Ruby 已创建的函数:concat。Watir webdriver,ChromeDriver 2.2,移动用户代理,ruby,cucumber,watir,selenium-chromedriver,Ruby,Cucumber,Watir,Selenium Chromedriver,我发现了错误 Selenium::WebDriver::Error::UnknownError: unknown error: Function already created: concat. (Session info: chrome=29.0.1547.62) (Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64) 当通过Jenkins、命令行或RubyMine运行Cumber测试时 我正在使用Watir we

我发现了错误

Selenium::WebDriver::Error::UnknownError: unknown error: Function already created: concat.
(Session info: chrome=29.0.1547.62)
(Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64)
当通过Jenkins、命令行或RubyMine运行Cumber测试时

我正在使用Watir webdriver,Chromedriver 2.2,webdriver用户代理Gem(将用户代理设置为移动用户代理)。在访问PayPal沙箱站点并执行以下操作后发生错误:

assert @browser.link(:class=>"scTrack bn:payWithCard").present?
或:

我已经尝试过断言文本在测试的早期存在,并且效果很好。可能与PayPal页面中发生的重定向有关:

请稍候,我们正在将您转到PayPal

如果您在1分钟内未连接,请单击此处


在我们的代码中没有任何称为concat的定义。我有63个其他测试使用相同的初始化代码、移动用户代理等,这些测试都不会抛出异常。我怀疑这是否重要,但我使用的是64位Windows 7 Professional。

在IRB控制台中运行的以下代码将导致错误发生:要求'watir webdriver'要求'webdriver user agent'driver=UserAgent.driver(:browser=>:chrome,:agent=>:android\u phone,:orientation=>:landscape)browser=Watir::browser.new driver browser.window.resize_to(500900)browser.goto(')put browser.text该页面上的元标记属性出现错误:“Viewport argument value”设备宽度;“对于键“width”无效,已被忽略。请注意,“;”在视口值中不是分隔符。列表应以逗号分隔。”看起来这是导致问题的原因。
assert @browser.text.include?(str)