Tag: calabash android

黄瓜高级步骤定义 – 语法错误,意外的tIDENTIFIER,期待keyword_end

我遵循了重复使用黄瓜的步骤 。 对于Ruby和Cucumber来说,我是个菜鸟。 我正在使用calabash-android 0.9.0和黄瓜2.4.0 我的calabash_steps.rb: require ‘calabash-android/calabash_steps’ Then /^I add the 1st bestsellers product to bag$/ do steps %Q { # App restarts and Onboarding screen shows again Given I see the text “next” Then I press the “next” button } end 完整堆栈跟踪: ❯ bundle exec calabash-android run app/build/outputs/apk/app-staging-debug.apk -t @bag /Users/eric/AndroidStudioProjects/xxx/features/step_definitions/calabash_steps.rb:7: syntax error, […]

无法加载这样的文件 – 2.2 / gherkin_lexer_en,如何修复?

我需要一些帮助。 我该如何解决这个问题? 当我调用cucumber我收到以下错误: *** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic on/) to get coloured output on Windows WARNING: cannot load such file — 2.2/gherkin_lexer_en Couldn’t load 2.2/gherkin_lexer_en The $LOAD_PATH was: lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-1.3.19/bin/../lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/builder-3.2.2/lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/diff-lcs-1.2.5/lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/multi_json-1.11.0/lib C:/Ruby22/lib/ruby/gems/2.2.0/gems/gherkin-2.12.2-x86-mingw32/lib […] 系统: Windows 8.1 x64 Ruby 2.2.1安装程序 我得到了答案: https : //github.com/cucumber/cucumber/issues/830#issuecomment-90837546 我担心Windows / Ruby上的Cucumber需要ruby 2.0.0(x86)。 原因是gherkin […]

在钩子之后访问黄瓜中的场景标题和示例

如何从After钩子中获取Ruby黄瓜测试中的当前Example ? 我可以使用下面的代码获得标题。 我的Scenario有几个Examples 。 我可以访问当前正在测试的Example吗? function文件 Scenario Outline: Successful login with primary accounts Given I start on the login page When I log into Overview page with “” Then I am on the Overview page Examples: | acct | | account1 | | account2 | 钩后 After do |scenario| scenario.scenario_outline.title # will give me […]

Calabash处理“使用完成操作”对话框

我想测试应用程序的共享function,但我不知道如何处理Android对话框“使用完整操作”(Facebook,Gmail等) 当我使用query(“*”)它返回一组空字段。 有没有办法使用Calabash或任何其他方式来处理这样的系统对话框来测试共享等function? 我在物理设备上运行我的测试。 编辑:如果无法检查对话框是否已打开,那么也许可以使用adb shell或类似的东西?