Step by step tutorial to integrate cucumber with selenium by Maven

1. Write a program to concat two string

Method name: String.concat();

public class Main {
    public static void main(String[] args) {
        String sentence1="Hello ";
        System.out.println(sentence1.concat("Java"));
    }

}
Output:
Hello Java

2. Write a program to find the length

Read more

1. Write a program to sort numeric numbers.

import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        int[] numbers={14,12,9,15,17,21,23,5,8,25};
        Arrays.sort(numbers);
        System.out.println(Arrays.toString(numbers));

    }
}
Output:
[5, 8, 9, 12, 14, 15, 17, 21, 23, 25]

2. Write a

Read more

Create a folder and open with vs code

Open terminal and hit the command:
npm i puppeteer cucumber chai cucumber-html-reporter

Then go to package.json and update the following code:

"scripts": {
    "test": "cucumber-js -f json:cucumber-report.json"
  },
  • cucumber-js : run the
Read more

Install nodejs

Download nodejs LTS version from here

After installing it, open CMD and check nodejs version by following command:
node --version

If showing version, then nodejs has been installed successfully

Install IDE

We will install Visual Studio Code as … Read more

Signup a New Customer

To signup a new customer, you have to call a POST HTTP Request

URL: https://customer-test-api.herokuapp.com/customer/api/v1/create

Body:
{
    "id": int,
    "name": "String",
    "email": "String",
    "address": "String",
    "phone_number":"String"
}

Remove “.only” from the previous HTTP Request

Go to … Read more

Writing script using POM

Open IntellIJ

If you don’t have IntellIJ, then download the community version from here

Start a new project with Gradle.

You can also start with maven, but here I am showing the process using Gradle. Actually, … Read more