Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
How to do single data parameterization without Examples in Cucumber?
We can do single data parametrization without using Examples in Cucumber by passing the value directly in the feature file.
Example
Feature file.
Feature: Tutorialpoint Job page Scenario: Tutorialpoint job page look and fee Given Launch site https:<a href="https://www.tutorialspoint.com/about/about_careers.htm" rel="nofollow" target="_blank">//www.tutorialspoint.com/about/about_careers.htm</a> Then Verify the tabs on the page
URL is directly passed in the Given statement in the feature file.
The step definition file should have the mapping of the Given statement.
Example
@Given (“^Launch site "([^"]*)"$”)
public void launchJobsite(String url){
System.out.println("url is : " + url);
}
@Then (“^Verify the tabs on the page"$”)
public void tabverification(){
System.out.println("Tabs verified successfully);
}
@Given (“^Launch site "([^"]*)"$”) passes the UR at the runtime.
Advertisements
