Questions tagged [cucumber]

Cucumber serves as a powerful tool for Behavior Driven Development (BDD), allowing functional descriptions in plain text (formatted in the user-friendly Gherkin language) to be run as automated tests.

Navigating dynamic steps in cucumber can be done effectively without relying on the AfterStep hook

I'm currently utilizing cucumber(info.cukes)-Selenium for executing automation tests. Presently, I am faced with a situation where a specific step could occur at any stage of the process. As a result, I need to create a cucumber scenario that can confirm ...

The command npm/cucumber - '.' is not recognized as a valid internal or external command

I recently installed npm and it's showing version 9.2.0. But when I try to run the command npm run test, I encounter an error stating that '.' is not recognized as an internal or external command. I have double-checked my environment variables, but I'm sti ...

The extension could not be loaded from: /tmp/unzip1122743988331191494stream

In order to be compliant, the 'manifest_version' key needs to have a value of 2 and should not include quotation marks. For more information, refer to developer.chrome.com/extensions/manifestVersion.html. ...

Executing identical Cucumber Features on multiple machines simultaneously with parallel_tests gem

Running identical Cucumber Features simultaneously on various machines using the parallel_tests gem I am currently exploring how to utilize the parallel_tests gem in order to execute the EXACT SAME Cucumber Features concurrently on different machines. At ...

Guide for clicking on a dynamic button with multiple words using cucumber and capybara

Struggling to write a test that involves clicking on a button with two separate words, as indicated in the code snippet below. The command Click_on("More Filters") is not effective because the button actually changes to "less Filters" when clicked due to ...

What is causing pre-defined variables to act unexpectedly in Cypress?

Encountering unexpected results while pre-defining element variables and using them later in Cypress 10 with Cucumber. Let's take a look at this login test: Given("I'm logged in as Default user", () => { cy.visit('/'); let us ...

Reattempting cucumber failed scenarios: Filters are not aligned: [@test1, @test, 23, 36]. Please use only one filter type [line, name, tag] at a time

Encountering an error message while attempting to re-execute failed Features in Cucumber using the rerun option, [Utils] [ERROR] [Error] java.lang.IllegalArgumentException: **Inconsistent filters: [@test1, @test, 23, 36]. Only one type [line,name,tag] can ...

Can an if-else statement be incorporated into the Cucumber test steps for a scenario that did not originally include one?

Here's the situation I am facing. In the past, the system under test (SUT) had just one button labeled "refund" for offers. Due to legal reasons, this button is now only accessible 20 days after the offer creation. Once this time period has passed, t ...

The Transition from Cucumber 4.5.x to Version 5.0.0

I've been facing challenges while updating an old test framework from Cucumber 4.5.x to a newer version. The project uses Maven, IntelliJ, Java, Selenium, and Cucumber. It seems like Cucumber is either intentionally misleading me or their documentati ...

The test session failed to launch due to an error in initializing the "@wdio/cucumber-framework" module. Error message: [ERR_PACKAGE_PATH_NOT_EXPORTED]

I added @wdio/cli to my project using the command 'npm i --save-dev @wdiocli'. Next, I ran 'npx wdio init' and chose 'cucumber', 'selenium-standalone-service', 'typescript', 'allure' along with the default options for the rest. This process resulted in d ...

Looking to implement a single tag with multiple values depending on the situation in cucumber?

In our automation framework, we have a cleanup hook that is tagged from the cucumber feature file. For example: @cc_task_clean_up_hook_enrol_A Scenario: Person can enrol_A When I select the context menu Then I am able to enroll the patient into & ...

Retrieving WebBrowser.Element using Selenium and Scala

Currently, I am developing a Scala helper object that contains high-level functions for interacting with elements on a webpage. These functions are designed to throw a NoSuchElementException if the required element is not found, with the main goal of code ...

There is an issue occurring with Minium involving glue and the browser

Can anyone explain why Minium (Selenium Webdriver Java + Cucumber) is generating this error trace? I've been trying to troubleshoot for hours, but nothing seems to resolve this issue. Project Structure https://i.stack.imgur.com/aqbGA.png Java: import ...

I'm currently in the process of automating tests for a nopCommerce website as a way to improve my skills, however, I've

Currently, I am in the process of practicing test automation on the website . However, I am facing an issue where the test stops after the first and second steps, indicating that it has passed without proceeding to the subsequent steps. The automation tool ...

Is "browser.text.include?" producing inaccurate results? (combining watir-webdriver and cucumber)

Does anyone know how to validate an error message when a form is submitted with a required field left empty? def usertabfieldvalidation @session.button(:class, "btn-primary").click @session.text.include?('Giant Ger ...

Creating a TestNG runner file with the cucumber-jvm-parallel-plugin: A step-by-step guide

I am having trouble generating the TestNG runner file from my POM file. I have double-checked all the configurations and they seem to be correct. Can someone please help me with the correct configuration? <build> <pluginManagement> ...

What is the most effective way to gauge the extent of automation coverage on a system being tested through analytical reports

What are some effective methods for quantifying automation statistics and coverage for a system being tested based on your experience? Summary: Presently, there are more than 100 tests (in feature files & scenarios) categorized by the area of the system ...

Is it possible to run both TestNG (group) and Cucumber (tag) tests simultaneously using a single command in Maven?

I have encountered a challenging issue that has left me stumped despite numerous attempts to solve it. The current setup involves a testng framework for GUI testing, where tests are executed based on groups in a maven command. I have been tasked with creat ...

WebdriverIO - string manipulation issue removing characters

I've encountered a strange issue while using the WebdriverIO functions setValue and addValue. It seems that whenever my string contains the number 3, it is mysteriously removed and not entered into the input boxes. I can manually type 3 into these inp ...

Having difficulty running cucumber test in Maven project

Below are the details of the pom file, runner file, and console output: Pom.xml file contains information about dependencies and plugins used <dependencies> <dependency> <groupId>javax.annotation</groupId> < ...

Exploring the possibilities of utilizing classes in testing scenarios with Vue, Cypress, and Cucumber

I am currently working on setting up e2e tests using Cypress and Cucumber for my project. The application is built with Vue CLI 4.1.1, and I have added the package cypress-cucumber-preprocessor (V1.19.0) via NPM. Update: After extensive research and tes ...

Managing duplicate xpaths in Selenium with Java

Seeking assistance with dynamically selecting items from a drop-down menu based on input. The challenge arises when values share the same name. For example, consider this Cucumber statement: When I go to the "Inventory" / "Inventory" application When ut ...

Using arguments in cucumber scenarios

Is there any way to pass only one parameter in a cucumber step, even if the method expects two? Here is the code snippet: @Given("^skip the next scenario named "(.*)"$") @BeforeStep public void before(Scenario scenario, String name) { ...

What could be the reason why my TestNG xml file is not directing to my Java Class?

Why isn't my TestNG XML file able to locate my Runner Class? This is how my XML File looks like: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Cucumber Framework" verbo ...

The UnknownError in Selenium WebDriver has been triggered due to an unexpected issue where the function attribute_value.lastIndexOf is not recognized

My cucumber test using selenium-webdriver is encountering an issue. Upon running my feature, the test fails with Selenium::WebDriver::Error::UnknownError: unknown error: attribute_value.lastIndexOf is not a function [5] pry(#<Object>)> fill_in ' ...

Cucumber experiencing issues in @before hook: NoClassDefFoundError

The automation framework is facing an issue where it does not proceed with executing steps in the .feature file after opening the Chrome browser, which then closes abruptly. Code Snippet from GenericStepImplementation.java: @Before public void setUp() th ...

Chrome 62 and Flash Player

I am currently facing a challenge with testing my Flash-based application using Cucumber. Since flash is not enabled by default, I have to manually enable it before each test and whitelist the URL. Although I can set these options manually when pausing the ...

The combination of spring, cucumber, and Selenium's fluent wait is causing my driver

I am attempting to implement fluent wait in my code @Component @Scope(SCOPE_CUCUMBER_GLUE) public class UserCreationPageImpl extends BaseBinariosPage implements UserCreationPage { Wait<WebDriver> wait = new FluentWait<WebDriver>( driver ) ...

Using a combination of Cucumber, Capybara, and Selenium to interact with and select

I am currently modifying a text editor and I have the task of selecting text for manipulation using JavaScript. Can you provide guidance on how to select text using Cucumber, Capybara, and Selenium? ...

What is the process for running selenium-based tests/scripts for an enterprise project or application?

One fundamental question that arises is how Selenium scripts are executed in an enterprise/project/application. These scripts are typically written in Java using locators and various tests are created. The tests are organized through TestNG and can be run ...

Utilizing selenium to input text values in robot framework

Using Robot Framework with Selenium 2.0, I have created a test that fills out a form and saves it. However, the issue I am facing is that when entering numeric values into text boxes, the default value of 0.0 is not being cleared. This results in the new v ...

Tips on how to incorporate information into variables in cucumber's feature files?

Currently tackling a UI selenium project where the goal is to extract String data from the UI and convert it into a variable within my .feature scenario file. In order to illustrate, let's take an example where I only have access to the customerID: ...

Error: cucumber command is not recognized on this Mac OS system

I attempted to install Cucumber by using the following commands: npm install -g cucumber and brew install cucumber-cpp Although it seemed like it installed successfully in both cases, I encountered an issue when trying to run the cucumber command: -ba ...

Encountering a java.lang.ExceptionInInitializerError when attempting to execute the Tests class due to an issue with cucumber.deps.com.thoughtworks.xstream.XStream.setup

Check out this dropbox link for further investigation. Encountered an issue while trying to run a test scenario in IntelliJ, resulting in java.lang.ExceptionInInitializerError at the first step. The StepDefinition class is provided below: package automatio ...

Ways to avoid running any cucumber-jvm scenarios if the initial scenario fails

I have 8 scenarios using cucumber-jvm, with the very first scenario focused on measuring page load time and checking environment availability. If this initial scenario fails, such as due to an unavailable environment or slow loading times, I want all other ...

How can I automate testing with Cucumber using Rails and Capybara to manage an AngularJS dialog box?

Currently, I am developing an application that utilizes AngularJS. There is a flow in the application where clicking a button triggers a dialog box to appear with various fields. I am facing an issue when trying to input values into the fields within the ...

Have you noticed blank screenshots appearing in extent reports when using Junit?

Utilizing Junit and cucumber framework for the execution of test scripts while setting up and running code on VDI. Check out the code snippet below, which is used to attach screenshots in the Apphooks- @AfterStep public void addScreenshot(Scenario sce ...

Environmental Variables for Universal Compatibility between Cucumber-JVM and Selenium WebDriver

As a QA tester, I specialize in writing automated tests for websites using cucumber-jvm and selenium webdriver. One feature that I believe would greatly benefit my project is the ability to have configurable settings. For instance, consider a scenario whe ...

What is the best way to efficiently distribute shared page objects and cucumber step definitions across various Ruby projects?

I am working on several projects that require the use of shared step definitions and page objects in cucumber tests. Rather than duplicating these common elements in each project, I would like to find a way to share them across multiple projects. Has anyo ...

Where can I find the Cypress.json file for Angular integration with Cypress using Cucumber?

We are currently transitioning from Protractor to Cypress utilizing Cucumber with the help of cypress-cucumber-preprocessor. While searching for Angular documentation on this setup, including resources like , all references lead to an automatically generat ...

Unable to retrieve docx files with selenium in headless chrome

Currently, I am in the process of automating an end-to-end (E2E) task that involves downloading files from a drop-down menu. The functionality works flawlessly using chromedriver without the headless mode activated. However, when I enable Chrome options fo ...

Experiencing a NullPointerException error while attempting to utilize FindElements for scanning and accessing all elements in

I am new to using selenium-cucumber and facing an issue with a Null pointer exception when trying to automate a web application. I have created page objects and used findelements to retrieve elements, which is causing the error. Any insights on this probl ...

Ruby: accessing the identifier of a constant instead of its assigned value

As I begin automating tests using Ruby with Selenium, I am facing a challenge in using the name of a constant instead of its value in my test script. The relevant files being used are as follows: LoginPage.rb: class LoginPage < Base FIELDS = { ...

The objects fail to initialize when using PageFactory.initElements(driver,class);

I am facing an issue while trying to initialize objects of the Homepage class Everything was working fine until yesterday, but for some unknown reason today it's not functioning properly package StepDefnitions; import org.openqa.selenium.WebDriver; ...

The name of the Worspace in space is resulting in a java.net.URISyntaxException

While working on my Selenium Project, I encountered an issue with the Workspace name containing a space. This resulted in the following error: Exception in thread "main" java.lang.IllegalArgumentException: C:/Users/xyz/eclipse-workspace ValveAware/TestPro ...

Guide on verifying confirmation popup using cucumber in Ruby on Rails

Currently, I am attempting to test a feature within my Ruby on Rails app using Cucumber and Capybara. The objective is to verify that when the "delete" button is clicked, a confirmation prompt appears saying "Are you sure?" followed by clicking "OK". Init ...

An error occurred in the cucumber StepDefinitions feature, specifically a java.lang.NullPointerException

I encountered a NullPointerException error while working on the Login action feature: Feature: Login action Scenario: Successful Login with Valid Credentials # C:/Users/chaitanya/workspace/cucumber2/src/feature/myfeature.feature:3 Given User is on Home ...

Is it possible to invoke Cucumber stepDefinitions from a separate project at the same directory level?

Currently, I have a project called integration_test that includes all test projects utilizing cucumberjs, typescript, and nodejs. Project1 contains the login implementation, and I would like to use this implementation in Scenarios from Project2 and Projec ...

What is the best way for Cucumber to move on to the next annotation only after ensuring all async requests from the previous one have finished processing?

I am looking to set up a basic test using Selenium and Cucumber for logging into my web application and confirming that the main page is displayed correctly. Currently, all three tests are returning true even before the page is fully loaded. The issue ar ...

What is the method to interact with an expand & collapse button in selenium using Java?

I'm trying to click on the expand button in order to view the menu items. @Then("^click on set up$") public void click_on_set_up() throws Throwable { driver.findElement(By.cssSelector("btn-header pull-right")).click(); } I have ...

Is it possible to run test steps for a bilingual (English and Arabic) web application using cucumber and selenium web driver?

I am interested in automating a series of test steps for interface testing in both English and Arabic. The steps include logging in, selecting products, and adding them to the cart. To achieve this, I have created a feature file in Cucumber and written al ...

Whenever I come across a matching glue code, eclipse always throws this error: "Step 'User is already on loginpage' does not have a corresponding glue code."

Running my runner file in eclipse presents a challenge as it indicates that the step - 'User is already on loginpage' does not have a corresponding glue code in my feature file. Furthermore, upon closing and reopening the feature file, eclipse displays an ...

Creating an HTML table for displaying a summary of test execution results in the body of an email using Outlook

Context: Within our project, which is based on selenium-cucumber-java-Mvn, we utilize the master thoughts Cucumber report (mvn dependency) for test execution reporting. This report is generated in the test>target directory and the link to this folder is a ...

Tips for ensuring the success of a cucumber scenario

I have successfully integrated my framework with JIRA. Each time I run scripts, the framework checks the status of the test case in JIRA before executing it. If the test case has already passed, I currently handle it by using: throw new SkipException(""S ...

Cucumber - Steps Without Definition Yet Fully Defined

I have recently started working on a Simple Selenium Cucumber project and have defined steps using the "Lambda Expressions Constructor" method in a feature file. However, when I tried to run the CucumberTest class, I encountered a failure exception. The ...

Cucumber is failing to execute examples, and the web page is not being initiated properly

public class Applicant_Login_StepDef { WebDriver driver; @Given("^the URL$") public void the_URL() throws Throwable { System.setProperty("webdriver.chrome.driver", "C:\Users\SSMP\Downloads\chromedriv ...

How can Cucumber be used to validate data from multiple JSON files?

I am currently working with a collection of JSON files within my automation framework. Each JSON file consists of an array containing multiple similar JSON objects. My goal is to utilize these files for validation in a web application using Cucumber and Se ...

The JsonFormatter is throwing an error because it is trying to access the property 'on' of an undefined variable

I have encountered an error while attempting to generate an HTML report using cucumber-html-reporter The error message is: Unhandled rejection TypeError: Cannot read property 'on' of undefined at new JsonFormatter (C:path-to-project ode_modulescucumbe ...

Cucumber Junit does not support parallel execution

I have set up my POM.xml file for running tests in parallel, but I am facing an issue. When I execute mvn verify using the command prompt, only one browser runs with one feature at a time. Once the execution of one feature file is complete, then the next f ...

Selenium Server operates in a manner distinct from WebDriver

I'm experiencing some challenges with Selenium. Let me try to outline the setup I have and what I am attempting to accomplish. Summarized Version: My automated tests run smoothly locally using a Ruby webdriver gem. However, when I run the same script thr ...

Challenge with running Cucumber tests

I am having an issue with my test runner code. It keeps saying "no feature file found" when I try to run the JUnit runner. Can someone please provide a screenshot showing the locations of the step definition and feature file? You can view the screenshot ...

The method `col_span` is not defined for the `Watir::TableCell` class, resulting in a NameError

Recently, I decided to explore automation testing and gave the following code a try. My attempt to launch the Firefox browser using the code snippet below: @browser = Watir::Browser.new :firefox @browser.goto "https://www.linkedin.com/" When(/^I enter u ...

Interacting with Watir and Cucumber, unfortunately the link is not functional

Being new to the world of Watir and Cucumber, I am currently in the process of running an automation script to create Live IDs. The link that I want to click on the webpage is labeled "New" and it should take me to a form where I can add a new contact for ...

Guide to transferring parameters from one function to another in Javascript

For my automation project using Protractor and Cucumber, I have encountered a scenario where I need to use the output of Function A in Function B. While I was able to do this without Cucumber by extending the function with "then", I am facing difficulties ...

Experiencing a problem with cucumber and selenium wherein the driver consistently turns null in a straightforward test scenario

I am facing a challenge with my test automation framework. I have noticed that when directly finding elements inside the step definitions class, it works fine. However, when I try to implement a base class along with page object model and page factory, it ...

Error: The update-config.json file could not be located in Protractor

I recently converted my Cucumber tests to TypeScript and started running them with Protractor. When I run the tests from the command-line using the following commands: rimraf cucumber/build && tsc -p cucumber && protractor cucumber/build/p ...

What is the best way to use CSS to target and select the first option in a dropdown menu?

Currently, I am in the process of setting up my automation framework using Cucumber, Selenium, and Ruby. As part of my initial test, I need to fill out a form to progress to the next step. This form includes a dropdown menu with multiple values, and I need ...

Dealing with changing elements using cucumber and capybara

(Click for image) I've been working on a project where I need to create a scenario to test the login feature. However, I've encountered an issue with Capybara not being able to access dynamic elements. To Reproduce the Issue: 1) Go to Redfin.co ...

Limiting capture group options in Cucumber for dynamic parameters: A comprehensive guide

Currently, I am working on creating a test automation step-definition using Cucumber and WebdriverJS. The scenario involves validating certain actions based on different service methods. Scenario Outline : Validate functionality for different service metho ...

During the execution of numerous automated tests on BrowserStack, the initial test is able to run successfully; however, the subsequent tests encounter an issue where the sessions are

Currently, I am setting up and running multiple automated tests using Cucumber and Selenium on BrowserStack. The first test scenario runs successfully, but starting from the second test, no session is established in BrowserStack. This leads to failure of t ...

Utilizing custom parameter types for Cypress Cucumber preprocessor with TypeScript

I have been using cypress-cucumber-preprocessor with cypress and typescript. While exploring the custom parameter types feature, I came across a possibility to define custom parameter types in my step definitions file. However, I am facing challenges when ...

Encountering a null pointer exception when attempting to declare a WebElementFacade within a page object

While attempting to implement the page object model in Serenity BDD, I encountered a null pointer exception when declaring WebElementFacade in my page object. Below is the code for my page object class: package PageObjects; import net.serenitybdd.core.an ...

Even with the correct Step Definition in place, Cucumber is struggling to locate it

While setting up the Selenium Cucumber framework, I encountered a problem. Even though the step definition path is correctly defined in the glue, it somehow cannot locate the cucumber step definition. Here are the installed jars: Cucumber-java, Cucumber-c ...

Is there a way to organize the report directories within the Selenium-Cucumber Maven framework?

In my Selenium - Cucumber Maven framework setup, I have successfully implemented code to generate report logs for each run. However, I am facing an issue where the report folders created do not appear in sorted order. Is there a method or solution availabl ...

Tips for executing multiple cucumber scenarios with identical initial steps and varying subsequent steps without redundancy

One problem I encountered is having duplicate steps in my feature file scenarios. The initial four lines are the same, but the succeeding steps differ for each scenario. Initially, I included all steps per scenario, but it resulted in a duplicate error. He ...