cucumber

unable to make relative path for step and feature files in protractor cucumberJS

青春壹個敷衍的年華 提交于 2020-03-25 19:22:07
问题 I have designed framework for protractor and for this I want that for each feature file I should be able to navigate to its respective step definition, for that I went through documentation of cucumber gherkin full support https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete and added the given code to settings.json but then also its not navigating to steps Please find the pic of my settings.json and folder structure and suggest me what should be the relative

client.elements is not working from a step definition using nightwatch-api

▼魔方 西西 提交于 2020-03-25 18:38:27
问题 I'm trying to do nightwatch and cucumber integration for BDD. I'm unable to access client.elements function in a step function. const { client } = require('nightwatch-api'); const { Given, Then, When } = require('cucumber'); const homePage = client.page.homepage(); Then(/^click "([^"]*)" service from list$/, async(service) => { let result = await client.url('http://localhost:8080/').elements('css selector', 'div.flex.mt-4.v-card.v-sheet.theme--light > div > div > table > tbody > tr'); console

Is there any way to specify eg (car|cars) in a cucumber step definition?

↘锁芯ラ 提交于 2020-03-25 12:33:20
问题 So I have 2 scenarios....one starts out Given I have 1 car The other starts out Given I have 2 cars I'd like them to use the same step definition - ie something like this Given('I have {int} (car|cars)', I know it's possible to do specify 2 possible values (ie car or cars), but I can't for the life of me remember how. Does anyone know? I'm using typescript, protractor, angular, selenium. Have also tried Given(/^I have {int} (car|cars)$ 回答1: Within cukeExp, the () become optional characters.

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

南楼画角 提交于 2020-03-21 19:23:04
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

房东的猫 提交于 2020-03-21 19:22:25
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

帅比萌擦擦* 提交于 2020-03-21 19:21:22
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Proper usage of cucumber with typescript?

人走茶凉 提交于 2020-03-21 16:03:14
问题 I was following a tutorial but the setup is really bad. Basically it uses typescript to convert .ts files to .js. So basically pollutes your whole source code with .js files around. So as soon as you import your .ts file from source code, all dependencies are duplicated with a .js file. Do you know how to do proper typescript cucumber tests? A hacky solution: Copy all features and all files to another temp folder, run from there. I would expect cucumber to be a bit more mature than this,

How to run code before/after cucumber suite?

北城以北 提交于 2020-02-06 16:24:07
问题 I'm trying to figure out how to run some code before and after all my cucumber tests run. I've been tracking down a bug for a few days where some our processes create jobs on a server, and don't properly clean it up. It's easy to miss so ideally I don't want engineers to have to manually add a check to every test. I was hoping there'd be a way to put a hook in before any tests ran to cache how many jobs exist on the server, then a hook at the end to ensure that the value hasn't changed. I

Global Variables - Katalon Studio

霸气de小男生 提交于 2020-02-05 20:55:11
问题 I am working with Cucumber & Groovy in Katalon Studio. I have ten feature file lines in Cucumber and corresponding step definitions. In my cucumber feature file first step has the indicator where if the first line is passed with the parameter with "NO RUN", the test case should not run and it should be moved to the next test case. So, I thought, I will use the Global variable indicator where I can handle in the test and assign the values. I see that and could create the Global Variable (RUN

After Step and before Step Cucumber

本秂侑毒 提交于 2020-02-05 02:03:09
问题 I want to execute something before and after each step (not scenario). How do I do that in Cucumber ? Like the after and before in junit. ** I am using java. 回答1: There should be something like AfterStep (haven't found BeforeStep yet) AfterStep do #After every step #this is also before the next step... end If you want to filter these for certain steps, do AfterStep('@cucumis', '@sativus') do # This will only run after steps within scenarios tagged # with @cucumis AND @sativus. end Reference: