Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 06 19:17
    mrsenzy closed #2194
  • Dec 06 19:17
    mrsenzy commented #2194
  • Dec 06 19:16
    mrsenzy edited #2195
  • Dec 06 19:15
    mrsenzy opened #2195
  • Dec 06 15:40
    ahnpnl starred cucumber/cucumber-js
  • Dec 06 12:39
  • Dec 05 21:13
    mrsenzy commented #2194
  • Dec 05 21:12
    mrsenzy commented #2194
  • Dec 03 17:06
    youvegotnigel starred cucumber/cucumber-js
  • Dec 03 13:37

    davidjgoss on main

    fix(deps): update dependency @c… (compare)

  • Dec 03 13:37

    davidjgoss on major-cucumber-packages

    (compare)

  • Dec 03 13:37
    davidjgoss closed #2193
  • Dec 03 12:05
    coveralls commented #2193
  • Dec 03 12:03
    renovate[bot] commented #2193
  • Dec 03 12:03
    davidjgoss synchronize #2193
  • Dec 03 12:03

    davidjgoss on major-cucumber-packages

    update japanese language exanpl… (compare)

  • Dec 02 21:35
    mrsenzy commented #2194
  • Dec 02 21:28
    mrsenzy commented #2194
  • Dec 02 21:05
    mrsenzy commented #2194
  • Dec 02 21:03
    mrsenzy commented #2194
Thomas G Henry
@ThomasGHenry
app is an expressjs instance
Arkadiusz Buchholz
@arkbuchholz
hello, is it possible to fetch logins and passwords from external file? I don't like idea of hardcoding creentials...
Leo Li
@yuxli066
you can use the .env file to do what you want to do
Rahul Kuntoji
@Rahul-Kuntoji
Hello, I am not able to get the step description using the afterStep hook.
Kārlis Amoliņš
@kamolins
Heyo. I am unable to find anything in the docs about listening to cuke events. The only information I can find on the web is old aka defineSupportCode which is deprecated now. I am on v5.1.0 and using TS. Any pointers would be most welcome
Ghost
@ghost~5d272f30d73408ce4fc5d0f4
Hi… I have a doubt..
I’m running a scenario . in that i need to capture screen shot. but the file name should be like “<fetureName><ScenarioName><BrowserNAme>.png”
Is it possible to get all those details in a step definition ??
vinayak-prime
@vinayak-prime
Hi All, how to handle datepicker with selenium-webdriverjs?
vinayak-prime
@vinayak-prime
Hi, how to wait for element to load in webdriverjs?
const condition = until.elementLocated(by.css('html'))
        await driver.wait(async driver => condition.fn(driver), 10000, 'Loading failed.')

        // await driver.wait(until.elementIsVisible(outwardTravelDate), 10000);
        // let actualResult = await outwardTravelDate.getText();
        // assert.equal(actualResult, expectedText);
Avik Hazra
@avikhazra
Hi Any one using cucumber with cypress
Phil Chen
@icloudphil
anyone try the retry option in cucumber-js? cucumber/cucumber-js#727 did not see the change got merged into Master, any thought?
Phil Chen
@icloudphil
seems like cucumber v6 has the capability. answered my own question. :)
08fercho
@08fercho1_twitter
Hi All, I was looking for an example of dynamic data in cucumber tables, I googled it but couldn't find any good example of it in js. Just in case do you know some example I can use as a guide?
Vagner Silva
@VagnerSilva

When I use a skipped return function
The next function also gets skipped status as I add a skipped just on the desired function without affecting the next function?

Then ('', () => 'skipped')

Then ('', () => 'expect')
this function does not perform 'expect' instead returns 'skipped' too

nabeelkhalaf1121
@nabeelkhalaf1121
Hi all quick qustion for someone new in cypress with cucumber, dose the step definitions (Before, After, Given, When, Then) works syncronized specially Before and After
and if there is a good reference about this part would appreciate that
Leo Li
@yuxli066
does anyone here use Junit reports?
viktor-silakov
@viktor-silakov
How can I get feature name from hooks?
Leo Li
@yuxli066
you can do that in the before hook @viktor-silakov
viktor-silakov
@viktor-silakov
@yuxli066 I knew only how to get scenario name, this works fine but now I need to get feature name, it's real?
Martin
@Domorodec
Hello, is there anybody who uses decorators with cucumber-tsflow for cucumber tests?
Leo Li
@yuxli066
@viktor-silakov , there should be cucumberjs hooks made available for us to use I believe
that would allow us to grab the feature file names
SandeepNS12
@SandeepNS12
Can anyone let me know the solution for the below code, as I'm new to cucumber
     Then('it should click on more-vertical button', function () {
       // Write code here that turns the phrase above into concrete actions
       return 'pending';
     });
Ghouse Mohiddin
@PlaxoGhouse
@SandeepNS12 u have to add the code( what your script/code need perform) in the Step Definition
SandeepNS12
@SandeepNS12
@PlaxoGhouse I have written code.. I'm trying to click same button twice(means after doing some task, it should click on the same button) but itz not working, it is showing the above issue in the terminal
Ghouse Mohiddin
@PlaxoGhouse
@SandeepNS12 Did you place the code in the above step definition?
Ghost
@ghost~5d272f30d73408ce4fc5d0f4

hi,
I’m getting an error 'Unexpected identifier’ with "import printWord from '../support/action/printWord’;” …

Given.js

const { Given } = require('cucumber’);
import printWord from '../support/action/printWord’;
Given(/^I print the (\S+) word$/, printWord);

printWord.js

export default word => {
console.log('============' + word);
};

Can any one help me ???

Gėorges
@gmoussayan

Hello guys, Im new to Cucumber (and automation in general). I have the following online calculator https://www.online-calculator.com/full-screen-calculator/ which uses html5-canvas... I wrote the below code

`package stepDefinitions;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.junit.Assert;

public class subtractionStepDefinition {

WebDriver driver;    

@Given("^user is already on the full screen calculator Page$")
public void user_is_already_on_the_full_screen_calculator_Page() {

    System.setProperty("webdriver.gecko.driver", "//Users//gmoussayan//Documents//Selenium//geckodriver");
    driver = new FirefoxDriver();
    driver.get("https://www.online-calculator.com/full-screen-calculator/");

}

@When("^title of page is Full Screen Calculator - Online Calculator$")
public void title_of_page_is_Full_Screen_Calculator_Online_Calculator() {

    String title = driver.getTitle();
    System.out.println(title);
    Assert.assertEquals("Full Screen Calculator - Online Calculator", title);

}

@Then("^user maximize the browser$")
public void user_maximize_the_browser() {

    driver.manage().window().maximize();

}

@Then("^user clicks on number six$")
public void user_clicks_on_number_six() {

    new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe")));
    WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas")));

    new Actions(driver).moveToElement(canvas, 20, 50).click().perform(); //6

}

@Then("^user clicks on number three$")
public void user_clicks_on_number_three() {

    new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe")));
    WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas")));

    new Actions(driver).moveToElement(canvas, 20, 100).click().perform(); //3

}

@Then("^user clicks on the subtraction sign$")
public void user_clicks_on_the_subtraction_sign() {

    new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe")));
    WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas")));

    new Actions(driver).moveToElement(canvas, 100, 100).click().perform(); // This is the Subtraction operation

}

@Then("^user clicks on the equal sign$")
public void user_clicks_on_the_equal_sign() {

    new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe")));
    WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas")));

    new Actions(driver).moveToElement(canvas, 150, 200).click().perform(); //This is the equal (=) operation


}

}`

but im receiving the error Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: #fullframe

This is happening because im using the below code under (as you see) all Gherkin keywords...

new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe"))); WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas")));

So im wondering how can i set new WebDriverWait(driver, 10).until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("fullframe"))); WebElement canvas = new WebDriverWait(driver, 10).until(ExpectedConditions.elementToBeClickable(By.id("canvas"))); to be readable by all Gherkin keywords without having to repeat it under each Gherkin keyword (which resulting on having it failing) - Im using Cucumber, Java and Selenium

any help would be highly appreciated. Thanks a lot :)
Ghost
@ghost~5d272f30d73408ce4fc5d0f4

Given(/^I open the (\S+) page$/, openWebSitenew.open(page));

is this snippest code is correct...

Leo Li
@yuxli066
is it possible to run browser.call async calls in after hooks?
I tried and it won't let me
GitHubernadette
@GitHubernadette
Hello everyone, I can't seem to access the attach property of this in the After hook. I verified that I'm not using arrow function. I don't have any error until my program actually gets to the specific line and print "this.attach is not a function" can someone help me ?
Erol
@FrEaKmAn
what is the best practive to setup setWorldConstructor?
actually where? because if I try to set this with protractor onPrepare, it fails with Cannot set property 'World' of undefined
nabeelkhalaf1121
@nabeelkhalaf1121
and if im using the mocha before all hook because there is no such hook in cucumber can i access the file path of the current test I see i can only access the title ?
Andrey Melnichenko
@AndreyMelnichenko
Hi everyone, can anyone help me to setup CustomWorld in my project here(https://github.com/AndreyMelnichenko/wdio-cucumber)? I can't reload default World object, project stack: WDIO5+Cucumber+TS.
Ghost
@ghost~5d272f30d73408ce4fc5d0f4
is it support cucumber html report with WDIO5 ?
Zhaopeng XUAN
@xuanzhaopeng
Hey team, any idea about cucumber/cucumber-js#1288
SandeepNS12
@SandeepNS12
@PlaxoGhouse yes
Ghost
@ghost~5d272f30d73408ce4fc5d0f4
Hi,
can anyone able to explain how i can implement 'http://mklabs.github.io/mocha-gherkin/‘ this ?
George Aristy
@llorllale
Hi
I'm trying to use cucumber within headless chrome, running my tests with karma.
I get this error while setting my custom world:
  TypeError: Cannot set property 'World' of undefined
      at setWorldConstructor (node_modules/cucumber/dist/cucumber.js:79569:29)
I browse to that line and I don't see where the options is set on _this?
  function SupportCodeLibraryBuilder() {
    var _this = this;

    _classCallCheck(this, SupportCodeLibraryBuilder);

    this.methods = {
      defineParameterType: this.defineParameterType.bind(this),
      After: this.defineTestCaseHook('afterTestCaseHookDefinitions'),
      AfterAll: this.defineTestRunHook('afterTestRunHookDefinitions'),
      Before: this.defineTestCaseHook('beforeTestCaseHookDefinitions'),
      BeforeAll: this.defineTestRunHook('beforeTestRunHookDefinitions'),
      defineStep: this.defineStep.bind(this),
      defineSupportCode: _util.default.deprecate(function (fn) {
        fn(_this.methods);
      }, 'cucumber: defineSupportCode is deprecated. Please require/import the individual methods instead.'),
      setDefaultTimeout: function setDefaultTimeout(milliseconds) {
        _this.options.defaultTimeout = milliseconds;
      },
      setDefinitionFunctionWrapper: function setDefinitionFunctionWrapper(fn) {
        _this.options.definitionFunctionWrapper = fn;
      },
      setWorldConstructor: function setWorldConstructor(fn) {
        _this.options.World = fn;                                                                 // ERROR ON THIS LINE
      }
    };
    this.methods.Given = this.methods.When = this.methods.Then = this.methods.defineStep;
  }
George Aristy
@llorllale
Ok - think I found where this.options is supposed to be set
George Aristy
@llorllale
Has anyone managed to make cucumber work with karma?
pnakhat
@pnakhat
Hi Anyone - Wondering if any one can help with cucumber hooks