Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 04 20:27
    coveralls commented #2229
  • Feb 04 20:25
    coveralls commented #2229
  • Feb 04 20:24
    davidjgoss synchronize #2229
  • Feb 04 20:24

    davidjgoss on exceptions-in-messages

    chore: delete old lock.yml chore: delete old stale.yml Merge branch 'main' into except… (compare)

  • Feb 04 20:23
    davidjgoss opened #2229
  • Feb 04 20:20

    davidjgoss on exceptions-in-messages

    use new exception object for fa… refactor junit formatter a bit (compare)

  • Feb 04 15:48

    davidjgoss on exceptions-in-messages

    upgrade cck prefactoring, omit undefined me… handle well-structured errors and 3 more (compare)

  • Feb 04 14:58
    zcmgyu closed #2227
  • Feb 04 14:58
    zcmgyu commented #2227
  • Feb 04 14:41
    mpkorstanje commented #2227
  • Feb 04 14:41
    mpkorstanje commented #2227
  • Feb 04 14:41
    zcmgyu commented #2227
  • Feb 04 14:26
    mpkorstanje commented #2227
  • Feb 04 12:50
    coveralls commented #2212
  • Feb 04 12:50

    davidjgoss on main

    chore: delete old stale.yml (compare)

  • Feb 04 12:49

    davidjgoss on main

    chore: delete old lock.yml (compare)

  • Feb 04 12:47

    renovate[bot] on cucumber-packages

    chore(deps): update dependency … (compare)

  • Feb 04 12:46

    davidjgoss on main

    chore(deps): update cucumber pa… (compare)

  • Feb 04 12:46

    davidjgoss on cucumber-packages

    (compare)

  • Feb 04 12:46
    davidjgoss closed #2212
Samuel Roldan
@sam3k
No I have not. I’ve only configured the After method on cucumber.conf.js. Not sure if the same?
I see the this.driver.quit(); but it does not seem to apply for chromedriver
Leo Li
@yuxli066
Hi all, what reporting service do you guys use for cucumberJS in v5?
Leo Li
@yuxli066
Hi all, is anyone experiencing allure report issues with v5 cucumberJS?
Thomas G Henry
@ThomasGHenry
Hey, folks. My tests appear to run and pass, but cucumber never returns. I'm new to cucumber and the debugging doc is just a stub. Where should I begin to look to resolve this? I should point out that my tests use async/await in case that matters.
Thanks in advance
const { Given, When, Then } = require('cucumber');
const app = require('../../lib/app');
const request = require('supertest');

Given('server is running', function() {
  console.log('assume server is running');
});

When(
  'user posts to upload endpoint',
  { timeout: 1 * 60 * 1000 },
  async function() {
    await request(app)
      .post('/uploads')
      .set('Accept', 'application/json')
      .attach('photo', 'test/testimage.jpg')
      .expect(200);
  }
);

Then('image is downloadable', async function() {
  await request(app)
    .get('/uploads/testimage.jpg')
    .set('Accept', 'application/json')
    .expect(200);
});
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