cucumber

Cucumber colored output changes depending on where I print text

☆樱花仙子☆ 提交于 2019-12-11 04:42:59
问题 When I print output straight from the Given/When/Then statements of cucumber, it prints in a nice blue text, however if I call into any other function and print within there, it prints in red (and not indented) Sample feature: Feature: Foo Scenario: Foo2 Given something Then something else Sample step_def: Given /^something$/ do puts "Pretty blue" end class AnyClass def doSomething puts "Scary red" end end Then /^something else$/ do AnyClass.new.doSomething end In the below sample output,

Cucumber error when I run my cucumber tests

本小妞迷上赌 提交于 2019-12-11 04:40:57
问题 I am new to ROR. I am using Ruby 1.9.2p290, rvm 1.10.2, chromedriver version=18.0.995.0. When I run the cucumber test by execute command: bundle exec cucumber features/mytest.feature I got the error message which is showing below: (::) failed steps (::) proxy must be of type dictionary, not null. Received: null (Selenium::WebDriver::Error::WebDriverError) 回答1: It seems that this error occurs since chromedriver version 18. (irb screenshot: http://www.pastie.org/pastes/3199163) To get a working

Karate scenario cannot be executed from intellij

别等时光非礼了梦想. 提交于 2019-12-11 04:38:01
问题 Unable to execute karate scenario from intellij OS: Mac Intellij version: Karate scenario cannot be executed from intellij Karate version: compile group: 'io.cucumber', name: 'cucumber-core', version: '4.7.0' testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'com.intuit.karate', name: 'karate-apache', version: '0.9.3' testCompile group: 'com.intuit.karate', name: 'karate-junit4', version: '0.9.3' Error message Error: Could not find or load main class cucumber.api

Capybara, selecting 1st option from dropdown?

孤者浪人 提交于 2019-12-11 04:36:50
问题 I've done a search and most of the related google results have returned just in general selecting an element from a dropdown. However the ID's in this case for the elements in the dropdown are dynamically generated unfortunately. This is for a base test case, so I basically just need to select for example the first one. The text is also the same for the elements in the dropdown (not sure if that helps). Is there such an example of this? Im using cucumber with caybara(using selenium driver)

Error when run cucumber with dry run option

自闭症网瘾萝莉.ら 提交于 2019-12-11 04:28:39
问题 I'm trying to improve the speed of running tests by opening and closing the browser only once. http://watirmelon.com/2012/04/01/five-page-object-anti-patterns/ I have the following in hooks.rb browser = Watir::Browser.new ENV['BROWSER'].to_sym Before do @browser = browser end After do |scenario| @browser.cookies.clear end at_exit do browser.close end It greatly boosts up the speed of test suite running. But I also need some statistics in json file from my custom formatter without running

How to integrate cucumber with Python language

二次信任 提交于 2019-12-11 04:27:57
问题 I have few scenarios which needs some data manipulation for Assertion. I know, it can be done by Java Script. But I wish to create a Utility file for custom reusable functions. Is there any possibility to integrate with Python through which Utility function can be called. 回答1: I strongly advise against it. If you really want, you might be able to call a command-line python program like this: * def FileUtils = Java.type('com.intuit.karate.FileUtils') * def runtime = java.lang.Runtime

How to compare date in cucumber/aruba?

穿精又带淫゛_ 提交于 2019-12-11 04:22:22
问题 I want to test my executable shell script with the help of cucumber/aruba. For that purpose I created one shell script and place it in usr/local/bin/ so it can accessible from anywhere. shell script : arg=$1 if [ [ $arg = 1 ] ] then echo $(date) fi Now I want to test this shell script in cucumber/aruba. For that purpose I created one project structure. aruba - . ├── features │ ├── support │ │ └── env.rb │ └── use_aruba_cucumber.feature ├── Gemfile Gemfile - source 'https://rubygems.org' gem

I receive the error: cannot find module 'cucumber' when executing Protractor

↘锁芯ラ 提交于 2019-12-11 04:07:31
问题 I have found some posts describing the steps for setting this up but when I follow them I receive an error: cannot find module 'cucumber'. I have cucumber and protractor and protractor-cucumber installed global and can execute them individually but not when trying to execute Protractor with a framework of cucumber. The config file I am using is as follows: var env = require('./environment.js'); // A small suite to make sure the cucumber framework works. exports.config = { seleniumAddress: env

How to match these steps unambiguously in Cucumber-JVM?

冷暖自知 提交于 2019-12-11 03:33:34
问题 Is there any way to match the following steps unambiguously? And I should have 2 alerts And I should have 2 alerts with param 71 I have implemented them as: @And("^I should have (\\d+) alerts") @And("^I should have (\\d+) alerts with param (\\d+)") When Cucumber evaluates the second step it says that it is ambiguous because it could have matched either of the two step definitions, even though it has the extra words 'with param'. Thanks in advance. 回答1: And I should have 2 alerts with param 71

Xolvio Cucumber - Getting errors in console yet all tests are passing

∥☆過路亽.° 提交于 2019-12-11 03:27:03
问题 I have the following code. It seems like my tests pass, but I get tons of errors in my console. What's going on? Are my tests non-deterministic and being re-run? If so how do I prevent the errors? login.feature: Feature: User authentication As a user I want to be able to login So that I can have all the good stuff that comes with user accounts Background: Given I am signed out Scenario: A user can sign up with valid information Given I am on the home page When I open the sign up modal And I