Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.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
Firefox Selenium::Webdriver与葫芦一起使用时抛出错误数量的参数错误_Firefox_Selenium_Selenium Webdriver_Cucumber_Calabash - Fatal编程技术网

Firefox Selenium::Webdriver与葫芦一起使用时抛出错误数量的参数错误

Firefox Selenium::Webdriver与葫芦一起使用时抛出错误数量的参数错误,firefox,selenium,selenium-webdriver,cucumber,calabash,Firefox,Selenium,Selenium Webdriver,Cucumber,Calabash,我尝试在运行葫芦ios脚本时启动firefox浏览。。。但它抛出了以下错误: #<ArgumentError: wrong number of arguments (0 for 1)> /gems/ruby-1.9.3-p448/gems/calabash-cucumber-0.9.155/lib/calabash-cucumber/operations.rb:67:in `tap' /rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rexml/parse

我尝试在运行葫芦ios脚本时启动firefox浏览。。。但它抛出了以下错误:

#<ArgumentError: wrong number of arguments (0 for 1)>
/gems/ruby-1.9.3-p448/gems/calabash-cucumber-0.9.155/lib/calabash-cucumber/operations.rb:67:in `tap'
/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:183:in `pull'
/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse'
/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rexml/document.rb:245:in `build'
/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize'
/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/extension.rb:44:in `new'
/gems/ruby-1.9.3-p448/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/firefox/extension.rb:44:in `read_id_from_install_rdf'
我可以单独启动firefox浏览器,而不需要葫芦脚本


如何克服这个问题?

答案很简单,它希望您传递一个参数,但您没有。因此,如果没有您的代码副本,我们将无法执行任何操作。'require'calabash cumber/cumber'require'calabash cumber/core'require'calabash cumber/operations'require'selenium webdriver'def launch_browser selenium::webdriver.for:firefox end def quit_browser browser browser.close end'分步执行,下面的命令是:“启动浏览器”你的葫芦黄瓜宝石已经过时了。最新版本为0.9.165。更新时,别忘了更新你的[calabash.framework.]我已经更新了我的葫芦黄瓜宝石。它仍然不起作用。我无法同时拥有水豚和葫芦的环境