step_file_name stringclasses 26
values | scenario stringlengths 13 161 | step_function stringlengths 33 2.68k | page_function stringlengths 41 4.12k | step_function_scenario stringlengths 59 2.81k | code stringlengths 110 4.43k | text stringlengths 305 4.7k |
|---|---|---|---|---|---|---|
BrowserControlSteps.java | I close the browser | public void closeBrowser(){
browserControlPage.closeBrowser();
}
} | public void closeBrowser(){
getDriver().close();
} | @And("I close the browser")
public void closeBrowser(){
browserControlPage.closeBrowser();
}
} | //step_function:
public void closeBrowser(){
browserControlPage.closeBrowser();
}
}
//page_function:
public void closeBrowser(){
getDriver().close();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I close the browser
###
response:
//step_function:
public void closeBrowser(){
browserControlPage.closeBrowser();
}
}
//page_function:
publi... |
CommonSteps.java | I wait for (\\d+) seconds | public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
} | public void waitForSometime(int duration) {
waitABit(duration);
} | @When("^I wait for (\\d+) seconds$")
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
} | //step_function:
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
}
//page_function:
public void waitForSometime(int duration) {
waitABit(duration);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I wait for (\\d+) seconds
###
response:
//step_function:
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
}
... |
CommonSteps.java | I click outside | public void clickOutside() {
commonPage.clickOutside();
} | public void clickOutside() {
outside.click();
} | @When("^I click outside$")
public void clickOutside() {
commonPage.clickOutside();
} | //step_function:
public void clickOutside() {
commonPage.clickOutside();
}
//page_function:
public void clickOutside() {
outside.click();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click outside
###
response:
//step_function:
public void clickOutside() {
commonPage.clickOutside();
}
//page_function:
public void clickOutside() ... |
CommonSteps.java | I click on (.*) button | public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
} | public void clickButton(String buttonText) {
String buttonXpath=String.format(parameterizedButton, buttonText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getDriver(),10);
wait.until(ExpectedConditions.elementToBeClickable(elem));
elem.click();
} | @Then("^I click on (.*) button$")
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
} | //step_function:
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
}
//page_function:
public void clickButton(String buttonText) {
String buttonXpath=String.format(parameterizedButton, buttonText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wai... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on (.*) button
###
response:
//step_function:
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
}
//page_funct... |
CommonSteps.java | I click on (.*) tab | public void clickTab(String tabText) {
commonPage.clickTab(tabText);
} | public void clickTab(String tabText) {
String buttonXpath=String.format(parameterizedTab, tabText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getDriver(),10);
wait.until(ExpectedConditions.elementToBeClickable(elem));
elem.click();
} | @Then("^I click on (.*) tab$")
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
} | //step_function:
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
}
//page_function:
public void clickTab(String tabText) {
String buttonXpath=String.format(parameterizedTab, tabText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getD... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on (.*) tab
###
response:
//step_function:
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
}
//page_function:
public voi... |
CommonSteps.java | After fetching data from data file )?I fetch OTP of Email (.* | public void getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((file!=null) && (file.contains("data file")))
email=commonPage.fetchDataF... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I fetch OTP of Email (.*)$")
public void getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((fi... | //step_function:
public void getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((file!=null) && (file.contains("data file")))
email=comm... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I fetch OTP of Email (.*
###
response:
//step_function:
public void getEmailOtp(String file, String email) throws In... |
CommonSteps.java | I enter the correct OTP in Login screen( but the old one| but the expired one)? | public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
waitABit(200);
typeInto(otpTextFields,correctOtp);
} | @And("^I enter the correct OTP in Login screen( but the old one| but the expired one)?$")
public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
} | //step_function:
public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.cle... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the correct OTP in Login screen( but the old one| but the expired one)?
###
response:
//step_function:
public void enterCorrectlyFetchedOtp(Strin... |
CommonSteps.java | I enter the correct OTP in SignUp screen | public void enterOTP(){
signupOTPPage.enterOtp(otp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | @And("^I enter the correct OTP in SignUp screen$")
public void enterOTP(){
signupOTPPage.enterOtp(otp);
} | //step_function:
public void enterOTP(){
signupOTPPage.enterOtp(otp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the correct OTP in SignUp screen
###
response:
//step_function:
public void enterOTP(){
signupOTPPage.enterOtp(otp);
}
//page_functi... |
CommonSteps.java | I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen | public void waitForStaticText(String textOrSubText, String expectedStaticText, String screen) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
commonPage.waitForStaticText(textOrSubText,expectedStaticText);
} | public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
switch(expectedStaticText) {
case "LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR":
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
break;
case "LOGIN_SCREEN1_STATIC_TEXT_HEADING"... | @Then("^I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen$")
public void waitForStaticText(String textOrSubText, String expectedStaticText, String screen) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
commonPage.waitForS... | //step_function:
public void waitForStaticText(String textOrSubText, String expectedStaticText, String screen) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
commonPage.waitForStaticText(textOrSubText,expectedStaticText);
}
//page_function:
public String fet... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen
###
response:
//step_function:
public void waitForStaticText(Str... |
adminLoginSteps.java | I click on Send me a code | public void sendMeACode() {
adminLoginPage.clickSendMeACode();
} | public void clickSendMeACode() {
waitFor(sendMeACodeButton);
clickOn(sendMeACodeButton);
waitFor(10000);
} | @And("^I click on Send me a code$")
public void sendMeACode() {
adminLoginPage.clickSendMeACode();
} | //step_function:
public void sendMeACode() {
adminLoginPage.clickSendMeACode();
}
//page_function:
public void clickSendMeACode() {
waitFor(sendMeACodeButton);
clickOn(sendMeACodeButton);
waitFor(10000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on Send me a code
###
response:
//step_function:
public void sendMeACode() {
adminLoginPage.clickSendMeACode();
}
//page_function:
p... |
adminLoginSteps.java | I should successfully land to Admin Dashboard | public void landAdminDashboard(){
adminLoginPage.landAdminDashboard();
} | public void landAdminDashboard() {
adminDashboard.shouldBeVisible();
waitFor(5000);
} | @Then("^I should successfully land to Admin Dashboard$")
public void landAdminDashboard(){
adminLoginPage.landAdminDashboard();
} | //step_function:
public void landAdminDashboard(){
adminLoginPage.landAdminDashboard();
}
//page_function:
public void landAdminDashboard() {
adminDashboard.shouldBeVisible();
waitFor(5000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I should successfully land to Admin Dashboard
###
response:
//step_function:
public void landAdminDashboard(){
adminLoginPage.landAdminDashboard(... |
adminLoginSteps.java | After fetching data from data file )?I search for (.*) in search box | public void searchColumn(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
adminLoginPage.searchColumn(search);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Then("^(After fetching data from data file )?I search for (.*) in search box$")
public void searchColumn(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
adminLoginPage.searchColumn(search)... | //step_function:
public void searchColumn(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
adminLoginPage.searchColumn(search);
}
//page_function:
public String fetchDataFromDataPropert... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I search for (.*) in search box
###
response:
//step_function:
public void searchColumn(String file, String search) ... |
adminLoginSteps.java | I click the (.*) customer on Customer grid | public void customerGrid(String value) {
adminLoginPage.clickCustomerGrid(value);
} | public void clickCustomerGrid(String value) {
waitFor(search_entry);
String actualColumnButton=String.format(parameterizedColumnButton, value);
clickOn(getDriver().findElement(By.xpath(actualColumnButton)));
} | @And("^I click the (.*) customer on Customer grid$")
public void customerGrid(String value) {
adminLoginPage.clickCustomerGrid(value);
} | //step_function:
public void customerGrid(String value) {
adminLoginPage.clickCustomerGrid(value);
}
//page_function:
public void clickCustomerGrid(String value) {
waitFor(search_entry);
String actualColumnButton=String.format(parameterizedColumnButton, value);
clickOn(getDriver().f... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click the (.*) customer on Customer grid
###
response:
//step_function:
public void customerGrid(String value) {
adminLoginPage.clickCustomerGr... |
adminLoginSteps.java | I select Flag customer application | public void flagCustomer() {
adminLoginPage.clickFlagCustomer();
} | public void clickFlagCustomer() {
waitFor(flagCustomerButton);
clickOn(flagCustomerButton);
} | @And("^I select Flag customer application$")
public void flagCustomer() {
adminLoginPage.clickFlagCustomer();
} | //step_function:
public void flagCustomer() {
adminLoginPage.clickFlagCustomer();
}
//page_function:
public void clickFlagCustomer() {
waitFor(flagCustomerButton);
clickOn(flagCustomerButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I select Flag customer application
###
response:
//step_function:
public void flagCustomer() {
adminLoginPage.clickFlagCustomer();
}
//page_... |
adminLoginSteps.java | I edit Customer Name as (.*) and save | public void CustomerName(String name) {
adminLoginPage.enterCustomerName(name);
} | public void enterCustomerName(String name) {
typeInto(name_txt, name);
waitFor(5000);
} | @And("^I edit Customer Name as (.*) and save$")
public void CustomerName(String name) {
adminLoginPage.enterCustomerName(name);
} | //step_function:
public void CustomerName(String name) {
adminLoginPage.enterCustomerName(name);
}
//page_function:
public void enterCustomerName(String name) {
typeInto(name_txt, name);
waitFor(5000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I edit Customer Name as (.*) and save
###
response:
//step_function:
public void CustomerName(String name) {
adminLoginPage.enterCustomerName(nam... |
adminLoginSteps.java | After fetching data from data file )?I edit Address in Customer Profile | public void enterSecondScreenDetails(String file,DataTable dataTable) {
List<List<String>> data = dataTable.raw();
adminLoginPage.enterCity(data.get(0).get(0));
adminLoginPage.enterAddress1(data.get(0).get(1));
adminLoginPage.enterAddress2(data.get(0).get(2));
} | public void enterCity(String city) {
enter(city).into(city_txt);
} | @Then("^(After fetching data from data file )?I edit Address in Customer Profile$")
public void enterSecondScreenDetails(String file,DataTable dataTable) {
List<List<String>> data = dataTable.raw();
adminLoginPage.enterCity(data.get(0).get(0));
adminLoginPage.enterAddress1(data.get(0).get(1));
... | //step_function:
public void enterSecondScreenDetails(String file,DataTable dataTable) {
List<List<String>> data = dataTable.raw();
adminLoginPage.enterCity(data.get(0).get(0));
adminLoginPage.enterAddress1(data.get(0).get(1));
adminLoginPage.enterAddress2(data.get(0).get(2));
}
//p... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I edit Address in Customer Profile
###
response:
//step_function:
public void enterSecondScreenDetails(String file,D... |
adminLoginSteps.java | I click on the Save button on Admin Page | public void clickSave() {
adminLoginPage.clickSave();
} | public void clickSave() {
waitFor(5000);
waitFor(saveButton);
clickOn(saveButton);
} | @And("^I click on the Save button on Admin Page$")
public void clickSave() {
adminLoginPage.clickSave();
} | //step_function:
public void clickSave() {
adminLoginPage.clickSave();
}
//page_function:
public void clickSave() {
waitFor(5000);
waitFor(saveButton);
clickOn(saveButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on the Save button on Admin Page
###
response:
//step_function:
public void clickSave() {
adminLoginPage.clickSave();
}
//page_funct... |
adminLoginSteps.java | I click on the Save button on Admin Page popup | public void clickSavePopup() {
adminLoginPage.clickSavePopup();
} | public void clickSavePopup() {
waitFor(savePopupButton);
clickOn(savePopupButton);
} | @And("^I click on the Save button on Admin Page popup$")
public void clickSavePopup() {
adminLoginPage.clickSavePopup();
} | //step_function:
public void clickSavePopup() {
adminLoginPage.clickSavePopup();
}
//page_function:
public void clickSavePopup() {
waitFor(savePopupButton);
clickOn(savePopupButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on the Save button on Admin Page popup
###
response:
//step_function:
public void clickSavePopup() {
adminLoginPage.clickSavePopup();
... |
adminLoginSteps.java | I click on the close button on Admin Page popup | public void clickClosePopup() {
adminLoginPage.clickClosePopup();
} | public void clickClosePopup() {
waitFor(closePopupButton);
clickOn(closePopupButton);
} | @And("^I click on the close button on Admin Page popup$")
public void clickClosePopup() {
adminLoginPage.clickClosePopup();
} | //step_function:
public void clickClosePopup() {
adminLoginPage.clickClosePopup();
}
//page_function:
public void clickClosePopup() {
waitFor(closePopupButton);
clickOn(closePopupButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on the close button on Admin Page popup
###
response:
//step_function:
public void clickClosePopup() {
adminLoginPage.clickClosePopup();
... |
adminLoginSteps.java | I assign (.*) Project | public void Project(String projectName)
{
adminLoginPage.assignProject(projectName);
} | public void assignProject(String projectName) {
waitFor(projectDropdown);
clickOn(projectDropdown);
String buttonXpath=String.format(parameterizedProject, projectName);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getDriver(... | @And("^I assign (.*) Project$")
public void Project(String projectName)
{
adminLoginPage.assignProject(projectName);
} | //step_function:
public void Project(String projectName)
{
adminLoginPage.assignProject(projectName);
}
//page_function:
public void assignProject(String projectName) {
waitFor(projectDropdown);
clickOn(projectDropdown);
String buttonXpath=String.format(parameterizedProject, pro... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I assign (.*) Project
###
response:
//step_function:
public void Project(String projectName)
{
adminLoginPage.assignProject(projectName);
... |
adminLoginSteps.java | I enter (.*) usage in Allocated Usage | public void allocatedUsage(String usage)
{
adminLoginPage.enterAllocatedUsage(usage);
} | public void enterAllocatedUsage(String usage) {
waitFor(allocatedUsage_txt);
typeInto(allocatedUsage_txt, usage);
} | @And("^I enter (.*) usage in Allocated Usage$")
public void allocatedUsage(String usage)
{
adminLoginPage.enterAllocatedUsage(usage);
} | //step_function:
public void allocatedUsage(String usage)
{
adminLoginPage.enterAllocatedUsage(usage);
}
//page_function:
public void enterAllocatedUsage(String usage) {
waitFor(allocatedUsage_txt);
typeInto(allocatedUsage_txt, usage);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter (.*) usage in Allocated Usage
###
response:
//step_function:
public void allocatedUsage(String usage)
{
adminLoginPage.enterAllocated... |
adminLoginSteps.java | I enter (.*) utility account number | public void UtilityAccountNumber(String utilityAccountNumber)
{
adminLoginPage.enterUtilityAccountNumber(utilityAccountNumber);
} | public void enterUtilityAccountNumber(String utilityAccountNumber) {
waitFor(utilityAccountNumber_txt);
typeInto(utilityAccountNumber_txt, utilityAccountNumber);
} | @And("^I enter (.*) utility account number$")
public void UtilityAccountNumber(String utilityAccountNumber)
{
adminLoginPage.enterUtilityAccountNumber(utilityAccountNumber);
} | //step_function:
public void UtilityAccountNumber(String utilityAccountNumber)
{
adminLoginPage.enterUtilityAccountNumber(utilityAccountNumber);
}
//page_function:
public void enterUtilityAccountNumber(String utilityAccountNumber) {
waitFor(utilityAccountNumber_txt);
typeInto(utilityAcc... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter (.*) utility account number
###
response:
//step_function:
public void UtilityAccountNumber(String utilityAccountNumber)
{
adminLogin... |
adminLoginSteps.java | I change Customer Status to (.* | public void changeStatus(String status)
{
adminLoginPage.changeCustomerStatus(status);
} | public void changeCustomerStatus(String status) {
waitFor(customerStatusDropdown);
clickOn(customerStatusDropdown);
String buttonXpath=String.format(parameterizedCustomerStatus, status);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDri... | @And("^I change Customer Status to (.*)$")
public void changeStatus(String status)
{
adminLoginPage.changeCustomerStatus(status);
} | //step_function:
public void changeStatus(String status)
{
adminLoginPage.changeCustomerStatus(status);
}
//page_function:
public void changeCustomerStatus(String status) {
waitFor(customerStatusDropdown);
clickOn(customerStatusDropdown);
String buttonXpath=String.format(paramet... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I change Customer Status to (.*
###
response:
//step_function:
public void changeStatus(String status)
{
adminLoginPage.changeCustomerStatus(... |
adminLoginSteps.java | After fetching data from data file )?I upload (.*) Utility Usage Document | public void uploadUtilityDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adminLoginPage.uploadUtilityDocument(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I upload (.*) Utility Usage Document$")
public void uploadUtilityDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adm... | //step_function:
public void uploadUtilityDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adminLoginPage.uploadUtilityDocument(value);
}
//page_function:
pub... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I upload (.*) Utility Usage Document
###
response:
//step_function:
public void uploadUtilityDocument(String file, S... |
adminLoginSteps.java | After fetching data from data file )?I upload (.*) LMI Bill Document | public void uploadLMIDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adminLoginPage.uploadLMIDocument(value);
}
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I upload (.*) LMI Bill Document$")
public void uploadLMIDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adminLoginPa... | //step_function:
public void uploadLMIDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
adminLoginPage.uploadLMIDocument(value);
}
}
//page_function:
public S... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I upload (.*) LMI Bill Document
###
response:
//step_function:
public void uploadLMIDocument(String file, String val... |
APISteps.java | I prepare headers for (.*) API | public void prepareHeaders(String apiName) throws IOException {
String target = null;
if(apiName.contains("session"))
target=commonPage.fetchDataFromDataProperties("sessionAPIAmzTarget");
else if(apiName.contains("authkey"))
target=commonPage.fetchDataFromDataProperties(... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^I prepare headers for (.*) API$")
public void prepareHeaders(String apiName) throws IOException {
String target = null;
if(apiName.contains("session"))
target=commonPage.fetchDataFromDataProperties("sessionAPIAmzTarget");
else if(apiName.contains("authkey"))
tar... | //step_function:
public void prepareHeaders(String apiName) throws IOException {
String target = null;
if(apiName.contains("session"))
target=commonPage.fetchDataFromDataProperties("sessionAPIAmzTarget");
else if(apiName.contains("authkey"))
target=commonPage.fetchDataFr... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I prepare headers for (.*) API
###
response:
//step_function:
public void prepareHeaders(String apiName) throws IOException {
String target = nu... |
APISteps.java | After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) project)? | public String preparePayload(String file, String email, String apiName, String anyProject, String specificProject) throws IOException {
if((file!=null) && (file.contains("data file"))) {
email=commonPage.fetchDataFromDataProperties(email);
}
clientid=commonPage.fetchDataFromDataPro... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Then("^(After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) project)?$")
public String preparePayload(String file, String email, String apiName, String anyProject, String specificProject) throws IOException {
if((file!=null) && (file.contains("data file"))) {
... | //step_function:
public String preparePayload(String file, String email, String apiName, String anyProject, String specificProject) throws IOException {
if((file!=null) && (file.contains("data file"))) {
email=commonPage.fetchDataFromDataProperties(email);
}
clientid=commonPage.fet... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) project)?
###
response:
//step_function:
public String prep... |
APISteps.java | After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers | public void add_API_Payload_with(String file, String apiURL, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
// int index=apiURL.indexOf("1006");
/... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^(After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers$")
public void add_API_Payload_with(String file, String apiURL, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"... | //step_function:
public void add_API_Payload_with(String file, String apiURL, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
// int index=apiURL.i... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers
###
response:
//step_function:
pub... |
APISteps.java | After fetching data from data file )?I set request specification with the (.*) API with headers and payload | public void add_API_Payload(String file, String apiURL) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
// int index=apiURL.indexOf("1006");
// if(index>=0)
//... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^(After fetching data from data file )?I set request specification with the (.*) API with headers and payload$")
public void add_API_Payload(String file, String apiURL) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonP... | //step_function:
public void add_API_Payload(String file, String apiURL) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
// int index=apiURL.indexOf("1006");
// ... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I set request specification with the (.*) API with headers and payload
###
response:
//step_function:
public void ad... |
APISteps.java | After fetching data from data file )?I add API params with parameter (.*) as (.* | public void prepareParams(String file, String paramKey, String paramValue) throws IOException {
if((file!=null) && (file.contains("data file")))
paramValue=commonPage.fetchDataFromDataProperties(paramValue);
if(paramKey.equals("fromDate")) {
LocalDate fromDate=LocalDate.now().minusM... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^(After fetching data from data file )?I add API params with parameter (.*) as (.*)$")
public void prepareParams(String file, String paramKey, String paramValue) throws IOException {
if((file!=null) && (file.contains("data file")))
paramValue=commonPage.fetchDataFromDataProperties(paramValue... | //step_function:
public void prepareParams(String file, String paramKey, String paramValue) throws IOException {
if((file!=null) && (file.contains("data file")))
paramValue=commonPage.fetchDataFromDataProperties(paramValue);
if(paramKey.equals("fromDate")) {
LocalDate fromDate=Local... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I add API params with parameter (.*) as (.*
###
response:
//step_function:
public void prepareParams(String file, St... |
APISteps.java | I prepare API headers( and pass authkey)? | public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOException {
headersMap=new HashMap<String,String>();
if((passAuthkey!=null)&&(passAuthkey.contains("auth")))
headersMap.put("Authorization",authKey);
headersMap.put("x-api-key",commonPage.fetchDataFromDataProper... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^I prepare API headers( and pass authkey)?$")
public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOException {
headersMap=new HashMap<String,String>();
if((passAuthkey!=null)&&(passAuthkey.contains("auth")))
headersMap.put("Authorization",authKey);
headers... | //step_function:
public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOException {
headersMap=new HashMap<String,String>();
if((passAuthkey!=null)&&(passAuthkey.contains("auth")))
headersMap.put("Authorization",authKey);
headersMap.put("x-api-key",commonPage.fetchD... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I prepare API headers( and pass authkey)?
###
response:
//step_function:
public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOExcepti... |
APISteps.java | After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers | public void add_API_Header(String file, String apiURL, String extension, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
//apiURL=apiURL+"/"+commonPage.fetch... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("^(After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers$")
public void add_API_Header(String file, String apiURL, String extension, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
a... | //step_function:
public void add_API_Header(String file, String apiURL, String extension, String customerId) throws IOException {
if((file!=null) && (file.contains("data file"))) {
apiURL=apiURL+"APIURL";
apiURL=commonPage.fetchDataFromDataProperties(apiURL);
}
//apiURL=apiURL+"/"... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers
###
response:
//step_func... |
BenefitScreenSteps.java | I agree to opt for the solar power in Benefit Onboarding screen | public void clickGetStarted() {
benefitScreenPage.clickYesIAmInButton();
}
} | public void clickYesIAmInButton() {
waitFor(yesIAmInButton);
clickOn(yesIAmInButton);
waitABit(5000);
} | @When("^I agree to opt for the solar power in Benefit Onboarding screen$")
public void clickGetStarted() {
benefitScreenPage.clickYesIAmInButton();
}
} | //step_function:
public void clickGetStarted() {
benefitScreenPage.clickYesIAmInButton();
}
}
//page_function:
public void clickYesIAmInButton() {
waitFor(yesIAmInButton);
clickOn(yesIAmInButton);
waitABit(5000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I agree to opt for the solar power in Benefit Onboarding screen
###
response:
//step_function:
public void clickGetStarted() {
benefitScreenPage.clickY... |
CheckAvailabilityScreenSteps.java | After fetching data from data file )?I check availability in zip code (.* | public void enterZipcode(String file,String zipcode) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
zipcode=commonPage.fetchDataFromDataProperties(zipcode);
checkAvailabilityScreenPage.enterZipcode(zipcode);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I check availability in zip code (.*)$")
public void enterZipcode(String file,String zipcode) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
zipcode=commonPage.fetchDataFromDataProperties(zipcode);
checkAvailabilityScreenP... | //step_function:
public void enterZipcode(String file,String zipcode) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
zipcode=commonPage.fetchDataFromDataProperties(zipcode);
checkAvailabilityScreenPage.enterZipcode(zipcode);
}
//page_function:
public String fetchDa... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I check availability in zip code (.*
###
response:
//step_function:
public void enterZipcode(String file,String zipc... |
CheckAvailabilityScreenSteps.java | After fetching data from data file )?I choose (.*) from Utility provider dropdown | public void selectUtilityProvider(String file,String utilityProvider) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
utilityProvider=commonPage.fetchDataFromDataProperties(utilityProvider);
checkAvailabilityScreenPage.selectUtilityProvider(utilityProvider);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I choose (.*) from Utility provider dropdown$")
public void selectUtilityProvider(String file,String utilityProvider) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
utilityProvider=commonPage.fetchDataFromDataProperties(util... | //step_function:
public void selectUtilityProvider(String file,String utilityProvider) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file")))
utilityProvider=commonPage.fetchDataFromDataProperties(utilityProvider);
checkAvailabilityScreenPage.selectUtilityProvider(utilityPro... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I choose (.*) from Utility provider dropdown
###
response:
//step_function:
public void selectUtilityProvider(String... |
CheckAvailabilityScreenSteps.java | Utility provider dropdown does not appear | public void validateUltilityProviderNotPresent() {
checkAvailabilityScreenPage.validateUltilityProviderNotPresent();
} | public void validateUltilityProviderNotPresent() {
utilityProviderDropdown.shouldNotBeCurrentlyVisible();
} | @Then("^Utility provider dropdown does not appear$")
public void validateUltilityProviderNotPresent() {
checkAvailabilityScreenPage.validateUltilityProviderNotPresent();
} | //step_function:
public void validateUltilityProviderNotPresent() {
checkAvailabilityScreenPage.validateUltilityProviderNotPresent();
}
//page_function:
public void validateUltilityProviderNotPresent() {
utilityProviderDropdown.shouldNotBeCurrentlyVisible();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
Utility provider dropdown does not appear
###
response:
//step_function:
public void validateUltilityProviderNotPresent() {
checkAvailabilityScreenPage... |
CheckAvailabilityScreenSteps.java | I wait for Utility provider dropdown | public void waitForUtilityProviderDropdown() {
checkAvailabilityScreenPage.waitForUtilityProviderDropdown();
}
} | public void waitForUtilityProviderDropdown() {
utilityProviderDropdown.waitUntilVisible();
} | @And("^I wait for Utility provider dropdown$")
public void waitForUtilityProviderDropdown() {
checkAvailabilityScreenPage.waitForUtilityProviderDropdown();
}
} | //step_function:
public void waitForUtilityProviderDropdown() {
checkAvailabilityScreenPage.waitForUtilityProviderDropdown();
}
}
//page_function:
public void waitForUtilityProviderDropdown() {
utilityProviderDropdown.waitUntilVisible();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I wait for Utility provider dropdown
###
response:
//step_function:
public void waitForUtilityProviderDropdown() {
checkAvailabilityScreenPage.waitForU... |
ExpandingFarmsScreenSteps.java | I see static (text|subtext) (.*) in Onboarding screen | public void validateStaticText(String textOrSubtext, String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
expandingFarmsScreenPage.validateStaticText(textOrSubtext,expectedStaticText);
} | public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
switch(expectedStaticText) {
case "LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR":
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
break;
case "LOGIN_SCREEN1_STATIC_TEXT_HEADING"... | @Then("^I see static (text|subtext) (.*) in Onboarding screen$")
public void validateStaticText(String textOrSubtext, String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
expandingFarmsScreenPage.validateStaticText(textOrSubtext,expectedSt... | //step_function:
public void validateStaticText(String textOrSubtext, String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
expandingFarmsScreenPage.validateStaticText(textOrSubtext,expectedStaticText);
}
//page_function:
public String fe... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I see static (text|subtext) (.*) in Onboarding screen
###
response:
//step_function:
public void validateStaticText(String textOrSubtext, String expected... |
ExpandingFarmsScreenSteps.java | After fetching data from data file )?I enter all the details for registering in Onboarding | public void enterRegistrationDetailsForOnboarding(String file, DataTable dataTable) throws Throwable {
String email,mobNum;
List<String> data = dataTable.asList(String.class);
if((file!=null)&&(file.contains("data file"))) {
email=commonPage.fetchDataFromDataProperties(data.get(2));;
mobNum=commonPage.fetch... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I enter all the details for registering in Onboarding$")
public void enterRegistrationDetailsForOnboarding(String file, DataTable dataTable) throws Throwable {
String email,mobNum;
List<String> data = dataTable.asList(String.class);
if((file!=null)&&(file.contains("da... | //step_function:
public void enterRegistrationDetailsForOnboarding(String file, DataTable dataTable) throws Throwable {
String email,mobNum;
List<String> data = dataTable.asList(String.class);
if((file!=null)&&(file.contains("data file"))) {
email=commonPage.fetchDataFromDataProperties(data.get(2));;
mobNum... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter all the details for registering in Onboarding
###
response:
//step_function:
public void enterRegistrationDe... |
ExpandingFarmsScreenSteps.java | I (dont )?see textfield Referral code in Onboarding screen | public void validateTextfieldReferralCode(String dontFlag) throws Exception {
expandingFarmsScreenPage.validateTextfieldReferralCode(dontFlag);
} | public void validateTextfieldReferralCode(String dontFlag) {
if(dontFlag==null)
referralCodeTextfield.shouldBePresent();
else if(dontFlag.contains("dont"))
referralCodeTextfield.shouldNotBePresent();
} | @And("^I (dont )?see textfield Referral code in Onboarding screen$")
public void validateTextfieldReferralCode(String dontFlag) throws Exception {
expandingFarmsScreenPage.validateTextfieldReferralCode(dontFlag);
} | //step_function:
public void validateTextfieldReferralCode(String dontFlag) throws Exception {
expandingFarmsScreenPage.validateTextfieldReferralCode(dontFlag);
}
//page_function:
public void validateTextfieldReferralCode(String dontFlag) {
if(dontFlag==null)
referralCodeTextfield.shouldBePresent();
else if(... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I (dont )?see textfield Referral code in Onboarding screen
###
response:
//step_function:
public void validateTextfieldReferralCode(String dontFlag) thro... |
ExpandingFarmsScreenSteps.java | After fetching data from data file )?I enter (.*) in Referral code textfield in Onboarding screen | public void enterValueInReferralCode(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
expandingFarmsScreenPage.enterReferralCode(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I enter (.*) in Referral code textfield in Onboarding screen$")
public void enterValueInReferralCode(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
expandingFarmsScreenP... | //step_function:
public void enterValueInReferralCode(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
expandingFarmsScreenPage.enterReferralCode(value);
}
//page_function:
public String fetchDataFromDataProperties... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter (.*) in Referral code textfield in Onboarding screen
###
response:
//step_function:
public void enterValueIn... |
ExpandingFarmsScreenSteps.java | I get error message (.*) for referral code textfield | public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
expandingFarmsScreenPage.validateErrorMessage(expectedError);
} | public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
switch(expectedError) {
case "INVALID_MOBILE_ERROR":
expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
break;
case "INVALID_EMAIL_ERROR":
expectedError=SupReferralLoginErrorMessagesEnu... | @Then("^I get error message (.*) for referral code textfield$")
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
expandingFarmsScreenPage.validateErrorMessage(expectedError);
} | //step_function:
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
expandingFarmsScreenPage.validateErrorMessage(expectedError);
}
//page_function:
public String fetchErrorMessageConstantsfromEnum... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I get error message (.*) for referral code textfield
###
response:
//step_function:
public void validateErrorForEmailOrMobileTextfield(String expectedErr... |
ExpandingFarmsScreenSteps.java | After fetching data from data file )?I see textfield Referral code prepopulated with (.*) in Onboarding screen | public void isReferralCodePrepopulatedWith(String file, String referralCode) throws Exception {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataProperties(referralCode);
expandingFarmsScreenPage.isReferralCodePrepopulatedWith(referralCode);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I see textfield Referral code prepopulated with (.*) in Onboarding screen$")
public void isReferralCodePrepopulatedWith(String file, String referralCode) throws Exception {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataPropertie... | //step_function:
public void isReferralCodePrepopulatedWith(String file, String referralCode) throws Exception {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataProperties(referralCode);
expandingFarmsScreenPage.isReferralCodePrepopulatedWith(referralCode);
}
//page_func... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I see textfield Referral code prepopulated with (.*) in Onboarding screen
###
response:
//step_function:
public void... |
ExpandingFarmsScreenSteps.java | I enter in Referral code textfield \([\]*)\ in Onboarding screen | public void enterSpecialCharInReferralCode(String value) throws Throwable {
expandingFarmsScreenPage.enterSpecialCharInReferralCode(value);
}
} | public void enterSpecialCharInReferralCode(String value) {
typeInto(referralCodeTextfield,value);
} | @And("^I enter in Referral code textfield \"([^\"]*)\" in Onboarding screen$")
public void enterSpecialCharInReferralCode(String value) throws Throwable {
expandingFarmsScreenPage.enterSpecialCharInReferralCode(value);
}
} | //step_function:
public void enterSpecialCharInReferralCode(String value) throws Throwable {
expandingFarmsScreenPage.enterSpecialCharInReferralCode(value);
}
}
//page_function:
public void enterSpecialCharInReferralCode(String value) {
typeInto(referralCodeTextfield,value);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter in Referral code textfield \([\]*)\ in Onboarding screen
###
response:
//step_function:
public void enterSpecialCharInReferralCode(String value) ... |
LmiScreenSteps.java | After fetching data from data file )?I upload (.*) document for LMI document | public void uploadLmiDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
lmiScreenPage.uploadLmiDocument(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I upload (.*) document for LMI document$")
public void uploadLmiDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
lmiScreenPage.uploadLmiDo... | //step_function:
public void uploadLmiDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
lmiScreenPage.uploadLmiDocument(value);
}
//page_function:
public String fetchDataFromDataPrope... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I upload (.*) document for LMI document
###
response:
//step_function:
public void uploadLmiDocument(String file, St... |
LmiScreenSteps.java | I wait for message that Your Document is Uploaded | public void verifyDocumentIsUploaded() {
lmiScreenPage.verifyDocumentIsUploaded();
}
} | public void verifyDocumentIsUploaded() {
waitFor(documentUploadedMsg);
} | @Then("^I wait for message that Your Document is Uploaded$")
public void verifyDocumentIsUploaded() {
lmiScreenPage.verifyDocumentIsUploaded();
}
} | //step_function:
public void verifyDocumentIsUploaded() {
lmiScreenPage.verifyDocumentIsUploaded();
}
}
//page_function:
public void verifyDocumentIsUploaded() {
waitFor(documentUploadedMsg);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I wait for message that Your Document is Uploaded
###
response:
//step_function:
public void verifyDocumentIsUploaded() {
lmiScreenPage.verifyDocumentI... |
OnboardingFirstScreenSteps.java | I choose Join Community Solar | public void chooseGoGreen() {
onboardingFirstScreenPage.goGreen();
} | public void goGreen() {
waitFor(goGreenButton);
clickOn(goGreenButton);
} | @When("^I choose Join Community Solar$")
public void chooseGoGreen() {
onboardingFirstScreenPage.goGreen();
} | //step_function:
public void chooseGoGreen() {
onboardingFirstScreenPage.goGreen();
}
//page_function:
public void goGreen() {
waitFor(goGreenButton);
clickOn(goGreenButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I choose Join Community Solar
###
response:
//step_function:
public void chooseGoGreen() {
onboardingFirstScreenPage.goGreen();
}
//page_function:
pu... |
OnboardingFirstScreenSteps.java | After fetching data from data file )?I am on Onboarding screen with (.*) referral code | public void onOnboardingScreenWithReferralCode(String file, String referralCode) throws Throwable {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataProperties(referralCode);
onboardingFirstScreenPage.openReferralLink(referralCode);
}
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Given("(After fetching data from data file )?I am on Onboarding screen with (.*) referral code$")
public void onOnboardingScreenWithReferralCode(String file, String referralCode) throws Throwable {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataProperties(referralCode);
... | //step_function:
public void onOnboardingScreenWithReferralCode(String file, String referralCode) throws Throwable {
if((file!=null)&&(file.contains("data file")))
referralCode=commonPage.fetchDataFromDataProperties(referralCode);
onboardingFirstScreenPage.openReferralLink(referralCode);
}
}
//page_function:
p... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I am on Onboarding screen with (.*) referral code
###
response:
//step_function:
public void onOnboardingScreenWithR... |
OnboardingLastScreenSteps.java | I navigate to (.*) Onboarding screen | // public void validateHeadingThankYouForYourPatience(String heading) {
// onboardingLastScreenPage.validateHeading(heading);
// }
} | public void validateHeading(String headingText) {
// WebElementFacade welem=(WebElementFacade) getDriver().findElement(By.xpath(String.format(heading, headingText)));
// waitFor(welem);
// } | @Then("^I navigate to (.*) Onboarding screen$")
// public void validateHeadingThankYouForYourPatience(String heading) {
// onboardingLastScreenPage.validateHeading(heading);
// }
} | //step_function:
// public void validateHeadingThankYouForYourPatience(String heading) {
// onboardingLastScreenPage.validateHeading(heading);
// }
}
//page_function:
public void validateHeading(String headingText) {
// WebElementFacade welem=(WebElementFacade) getDriver().findElement(By.xpath(String.format(heading,... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I navigate to (.*) Onboarding screen
###
response:
//step_function:
// public void validateHeadingThankYouForYourPatience(String heading) {
// onboardin... |
PaymentScreenSteps.java | I agree and click on Subscriber Agreement button on Payment screen | public void clickSubsciberAgreement()
{
paymentScreenPage.clickSubsciberAgreementButton();
} | public void clickSubsciberAgreementButton() {
waitFor(subscriberAgreementButton);
clickOn(subscriberAgreementButton);
} | @And("^I agree and click on Subscriber Agreement button on Payment screen$")
public void clickSubsciberAgreement()
{
paymentScreenPage.clickSubsciberAgreementButton();
} | //step_function:
public void clickSubsciberAgreement()
{
paymentScreenPage.clickSubsciberAgreementButton();
}
//page_function:
public void clickSubsciberAgreementButton() {
waitFor(subscriberAgreementButton);
clickOn(subscriberAgreementButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I agree and click on Subscriber Agreement button on Payment screen
###
response:
//step_function:
public void clickSubsciberAgreement()
{
paymentScree... |
PaymentScreenSteps.java | I accept Hawaii Disclosure | public void acceptDisclosure() {
paymentScreenPage.acceptHawaiiDisclosure();
}
} | public void acceptHawaiiDisclosure() {
waitFor(acceptHawaiiDisclosureButton);
JavascriptExecutor js = (JavascriptExecutor) getDriver();
// getDriver().switchTo().frame(getDriver().findElement(By.xpath("//div[@class='__PrivateStripeElement']//iframe[1]")));
// JavascriptExecutor js = (Javas... | @And("^I accept Hawaii Disclosure$")
public void acceptDisclosure() {
paymentScreenPage.acceptHawaiiDisclosure();
}
} | //step_function:
public void acceptDisclosure() {
paymentScreenPage.acceptHawaiiDisclosure();
}
}
//page_function:
public void acceptHawaiiDisclosure() {
waitFor(acceptHawaiiDisclosureButton);
JavascriptExecutor js = (JavascriptExecutor) getDriver();
// getDriver().switchTo().frame(getDriver... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I accept Hawaii Disclosure
###
response:
//step_function:
public void acceptDisclosure() {
paymentScreenPage.acceptHawaiiDisclosure();
}
}
//page_fu... |
StripePaymentScreenSteps.java | I enter (card|US bank account) details for utility savings | public void enterCardDetails(String type, DataTable dt){
List<String> list=dt.asList(String.class);
if(type.contains("card"))
stripePaymentScreenPage.enterCardDetails(list.get(0),list.get(1),list.get(2), list.get(3));
else if(type.contains("bank"))
stripePaymentScreenPage.enterAccountDetails(list.get(0),lis... | public void enterCardDetails(String cardNumberValue, String expiryValue, String cvcValue, String dobValue) {
getDriver().switchTo().frame(getDriver().findElement(By.xpath("//div[@class='__PrivateStripeElement']//iframe[1]")));
waitFor(cardNumberTextField);
typeInto(cardNumberTextField, cardNumberValue);
typeInt... | @When("^I enter (card|US bank account) details for utility savings$")
public void enterCardDetails(String type, DataTable dt){
List<String> list=dt.asList(String.class);
if(type.contains("card"))
stripePaymentScreenPage.enterCardDetails(list.get(0),list.get(1),list.get(2), list.get(3));
else if(type.contains("... | //step_function:
public void enterCardDetails(String type, DataTable dt){
List<String> list=dt.asList(String.class);
if(type.contains("card"))
stripePaymentScreenPage.enterCardDetails(list.get(0),list.get(1),list.get(2), list.get(3));
else if(type.contains("bank"))
stripePaymentScreenPage.enterAccountDetail... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter (card|US bank account) details for utility savings
###
response:
//step_function:
public void enterCardDetails(String type, DataTable dt){
List... |
UtilityScreenSteps.java | After fetching data from data file )?I upload (.*) bill document | public void uploadBillDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
utilityScreenPage.uploadDocument(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I upload (.*) bill document$")
public void uploadBillDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
utilityScreenPage.uploadDocument(val... | //step_function:
public void uploadBillDocument(String file, String value) throws AWTException, IOException {
if ((file != null) && (file.contains("data file")))
value = commonPage.fetchDataFromDataProperties(value);
utilityScreenPage.uploadDocument(value);
}
//page_function:
public String fetchDataFromDataPro... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I upload (.*) bill document
###
response:
//step_function:
public void uploadBillDocument(String file, String value)... |
UtilityScreenSteps.java | I wait for message that Your Bill is Uploaded | public void verifyBillIsUploaded() {
utilityScreenPage.verifyBillIsUploaded();
} | public void verifyBillIsUploaded() {
waitFor(billUploadedMsg);
} | @Then("^I wait for message that Your Bill is Uploaded$")
public void verifyBillIsUploaded() {
utilityScreenPage.verifyBillIsUploaded();
} | //step_function:
public void verifyBillIsUploaded() {
utilityScreenPage.verifyBillIsUploaded();
}
//page_function:
public void verifyBillIsUploaded() {
waitFor(billUploadedMsg);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I wait for message that Your Bill is Uploaded
###
response:
//step_function:
public void verifyBillIsUploaded() {
utilityScreenPage.verifyBillIsUploade... |
UtilityScreenSteps.java | I provide the Utility Details | public void provide_UtilityDetails() {
utilityScreenPage.provideUtilityDetails();
}
} | public void provideUtilityDetails() {
waitABit(5000);
clickOn(signinButton);
getDriver().switchTo().frame(getDriver().findElement(By.xpath("//div[@class='MuiDialogContent-root']//iframe")));
waitABit(5000);
// typeInto(customerEmailTextfield,"incedo1@yopmail.com");
typeInto(uesrNameTextfield,"UAPI_TEST_resid... | @And("^I provide the Utility Details$")
public void provide_UtilityDetails() {
utilityScreenPage.provideUtilityDetails();
}
} | //step_function:
public void provide_UtilityDetails() {
utilityScreenPage.provideUtilityDetails();
}
}
//page_function:
public void provideUtilityDetails() {
waitABit(5000);
clickOn(signinButton);
getDriver().switchTo().frame(getDriver().findElement(By.xpath("//div[@class='MuiDialogContent-root']//iframe")));... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I provide the Utility Details
###
response:
//step_function:
public void provide_UtilityDetails() {
utilityScreenPage.provideUtilityDetails();
}
}
//... |
DashboardScreenSteps.java | I should be successful in creating a new account (.* | public void isSuccessfullySignedUp(String userName){
assert dashboardPage.isUserLoggedByName(userName);
} | public boolean isUserLoggedByName(String expectedName){
return (hiUserName_lbl.getText()).contains(expectedName)?true:false;
} | @Then("^I should be successful in creating a new account (.*)$")
public void isSuccessfullySignedUp(String userName){
assert dashboardPage.isUserLoggedByName(userName);
} | //step_function:
public void isSuccessfullySignedUp(String userName){
assert dashboardPage.isUserLoggedByName(userName);
}
//page_function:
public boolean isUserLoggedByName(String expectedName){
return (hiUserName_lbl.getText()).contains(expectedName)?true:false;
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I should be successful in creating a new account (.*
###
response:
//step_function:
public void isSuccessfullySignedUp(String userName){
assert d... |
DashboardScreenSteps.java | I should successfully land to dashboard | public void landDashboard(){
dashboardPage.landDashboard();
}
} | public void landDashboard() {
welcomeDashboard.shouldBeVisible();
} | @Then("^I should successfully land to dashboard$")
public void landDashboard(){
dashboardPage.landDashboard();
}
} | //step_function:
public void landDashboard(){
dashboardPage.landDashboard();
}
}
//page_function:
public void landDashboard() {
welcomeDashboard.shouldBeVisible();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I should successfully land to dashboard
###
response:
//step_function:
public void landDashboard(){
dashboardPage.landDashboard();
}
}
//pa... |
FetchLoginOTPviaEmailSteps.java | I enter the correct Email OTP in Login screen | public void fetchEmailOTPAndEnter() throws InterruptedException {
String newID = loginSecondPageScreen_emailOTP.openNewTabAndSwitch();
//loginSecondPageScreen_emailOTP.enterEmail();
}
} | public String openNewTabAndSwitch() throws InterruptedException {
WebDriver driver = getDriver();
//Keys.chord(Keys.CONTROL,"T");
enter(Keys.CONTROL+"t").into(enterEmail_txt);
wait(5000);
String newTabID = (String)(driver.getWindowHandles().stream().toArray())[1];
driver.... | @And("^I enter the correct Email OTP in Login screen$")
public void fetchEmailOTPAndEnter() throws InterruptedException {
String newID = loginSecondPageScreen_emailOTP.openNewTabAndSwitch();
//loginSecondPageScreen_emailOTP.enterEmail();
}
} | //step_function:
public void fetchEmailOTPAndEnter() throws InterruptedException {
String newID = loginSecondPageScreen_emailOTP.openNewTabAndSwitch();
//loginSecondPageScreen_emailOTP.enterEmail();
}
}
//page_function:
public String openNewTabAndSwitch() throws InterruptedException {
WebDr... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the correct Email OTP in Login screen
###
response:
//step_function:
public void fetchEmailOTPAndEnter() throws InterruptedException {
St... |
LoginFirstScreenSteps.java | After fetching data from data file )?I enter value (.*) in email or mobile textfield | public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
loginFirstScreenPage.enterLoginEmailOrMobile(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I enter value (.*) in email or mobile textfield$")
public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
loginFirstScreenPage.enterLoginEmailOrM... | //step_function:
public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
loginFirstScreenPage.enterLoginEmailOrMobile(value);
}
//page_function:
public String fetchDataFromDataProperties(... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter value (.*) in email or mobile textfield
###
response:
//step_function:
public void enterEmailOrMobile(String... |
LoginFirstScreenSteps.java | I click Send me a Code button | public void sendMeACode() {
loginFirstScreenPage.clickLoginSendMeACode();
} | public void clickLoginSendMeACode() {
waitFor(sendMeACodeButton);
clickOn(sendMeACodeButton);
} | @And("^I click Send me a Code button$")
public void sendMeACode() {
loginFirstScreenPage.clickLoginSendMeACode();
} | //step_function:
public void sendMeACode() {
loginFirstScreenPage.clickLoginSendMeACode();
}
//page_function:
public void clickLoginSendMeACode() {
waitFor(sendMeACodeButton);
clickOn(sendMeACodeButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click Send me a Code button
###
response:
//step_function:
public void sendMeACode() {
loginFirstScreenPage.clickLoginSendMeACode();
}
//page_funct... |
LoginFirstScreenSteps.java | I get error message (.*) for email or mobile textfield | public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
loginFirstScreenPage.validateErrorMessage(expectedError);
} | public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
switch(expectedError) {
case "INVALID_MOBILE_ERROR":
expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
break;
case "INVALID_EMAIL_ERROR":
expectedError=SupReferralLoginErrorMessagesEnu... | @Then("^I get error message (.*) for email or mobile textfield$")
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
loginFirstScreenPage.validateErrorMessage(expectedError);
} | //step_function:
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
loginFirstScreenPage.validateErrorMessage(expectedError);
}
//page_function:
public String fetchErrorMessageConstantsfromEnum(Str... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I get error message (.*) for email or mobile textfield
###
response:
//step_function:
public void validateErrorForEmailOrMobileTextfield(String expectedE... |
LoginFirstScreenSteps.java | After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield | public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
loginFirstScreenPage.validatePrepopulatedEmailOrMobileTextfield(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield$")
public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromData... | //step_function:
public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
loginFirstScreenPage.validatePrepopulatedEmailOrMobileTextfield(value)... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield
###
response:
//step_function:
public void validatePrepop... |
LoginFirstScreenSteps.java | I (dont )?see default text (.*) in email or mobile textfield | public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) {
loginFirstScreenPage.validateDefaultTextEmailOrMobileTextfield(dontFlag,value);
} | public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
Assert.assertEquals("true",emailOrMobileTextFieldLabel.getAttribute("data-shrink"));
} | @When("^I (dont )?see default text (.*) in email or mobile textfield$")
public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) {
loginFirstScreenPage.validateDefaultTextEmailOrMobileTextfield(dontFlag,value);
} | //step_function:
public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) {
loginFirstScreenPage.validateDefaultTextEmailOrMobileTextfield(dontFlag,value);
}
//page_function:
public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) {
if((dontFlag!=null)&&(do... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I (dont )?see default text (.*) in email or mobile textfield
###
response:
//step_function:
public void validateDefaultTextEmailOrMobileTextfield(String ... |
LoginFirstScreenSteps.java | I see static text (.*) in Login screen | public void validateStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateStaticText(expectedStaticText);
} | public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
switch(expectedStaticText) {
case "LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR":
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
break;
case "LOGIN_SCREEN1_STATIC_TEXT_HEADING"... | @Then("^I see static text (.*) in Login screen$")
public void validateStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateStaticText(expectedStaticText);
} | //step_function:
public void validateStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateStaticText(expectedStaticText);
}
//page_function:
public String fetchStaticTextConstantsfromEnum(String ex... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I see static text (.*) in Login screen
###
response:
//step_function:
public void validateStaticText(String expectedStaticText) throws Exception {
expe... |
LoginFirstScreenSteps.java | I see secondary static text (.*) in Login screen | public void validateSecondaryStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateSecondaryStaticText(expectedStaticText);
}
} | public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
switch(expectedStaticText) {
case "LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR":
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
break;
case "LOGIN_SCREEN1_STATIC_TEXT_HEADING"... | @Then("^I see secondary static text (.*) in Login screen$")
public void validateSecondaryStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateSecondaryStaticText(expectedStaticText);
}
} | //step_function:
public void validateSecondaryStaticText(String expectedStaticText) throws Exception {
expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText);
loginFirstScreenPage.validateSecondaryStaticText(expectedStaticText);
}
}
//page_function:
public String fetchStaticTextConstan... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I see secondary static text (.*) in Login screen
###
response:
//step_function:
public void validateSecondaryStaticText(String expectedStaticText) throws... |
LoginSecondScreenSteps.java | I click on Submit button on Login screen | public void submit() {
loginSecondScreenPage.submitLogin();
} | public void submitLogin() {
otpTextFields.submit();
waitABit(10000);
} | @When("^I click on Submit button on Login screen$")
public void submit() {
loginSecondScreenPage.submitLogin();
} | //step_function:
public void submit() {
loginSecondScreenPage.submitLogin();
}
//page_function:
public void submitLogin() {
otpTextFields.submit();
waitABit(10000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on Submit button on Login screen
###
response:
//step_function:
public void submit() {
loginSecondScreenPage.submitLogin();
}
//page_function... |
LoginSecondScreenSteps.java | I enter the incorrect OTP (.*) in Login screen | public void enterIncorrectOTP(String incorrectOtp) {
loginSecondScreenPage.enterOtp(incorrectOtp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
waitABit(200);
typeInto(otpTextFields,correctOtp);
} | @When("^I enter the incorrect OTP (.*) in Login screen$")
public void enterIncorrectOTP(String incorrectOtp) {
loginSecondScreenPage.enterOtp(incorrectOtp);
} | //step_function:
public void enterIncorrectOTP(String incorrectOtp) {
loginSecondScreenPage.enterOtp(incorrectOtp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFiel... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the incorrect OTP (.*) in Login screen
###
response:
//step_function:
public void enterIncorrectOTP(String incorrectOtp) {
loginSecondScreenPag... |
LoginSecondScreenSteps.java | I (dont )?get error message (.*) for OTP textfields | public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
loginSecondScreenPage.validateNoErrorMessage();
}
else {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
loginS... | public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
switch(expectedError) {
case "INVALID_MOBILE_ERROR":
expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
break;
case "INVALID_EMAIL_ERROR":
expectedError=SupReferralLoginErrorMessagesEnu... | @Then("^I (dont )?get error message (.*) for OTP textfields$")
public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
loginSecondScreenPage.validateNoErrorMessage();
}
else {
expectedError=commonPa... | //step_function:
public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
loginSecondScreenPage.validateNoErrorMessage();
}
else {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expected... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I (dont )?get error message (.*) for OTP textfields
###
response:
//step_function:
public void validateErrorMeesage(String dontFlag, String expectedError... |
LoginSecondScreenSteps.java | I choose to Go Back | public void goBack() {
loginSecondScreenPage.goBack();
} | public void goBack() {
goBack.click();
} | @When("^I choose to Go Back$")
public void goBack() {
loginSecondScreenPage.goBack();
} | //step_function:
public void goBack() {
loginSecondScreenPage.goBack();
}
//page_function:
public void goBack() {
goBack.click();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I choose to Go Back
###
response:
//step_function:
public void goBack() {
loginSecondScreenPage.goBack();
}
//page_function:
public void goBack() ... |
LoginSecondScreenSteps.java | I see empty OTP textfields | public void validateEmptyOtpTextfields() {
loginSecondScreenPage.validateOtpIsEmpty();
} | public void validateOtpIsEmpty() {
otpTextFields.waitUntilVisible();
String a=otpTextFields.getText();
Assert.assertTrue(a.equals(""));
} | @Then("^I see empty OTP textfields$")
public void validateEmptyOtpTextfields() {
loginSecondScreenPage.validateOtpIsEmpty();
} | //step_function:
public void validateEmptyOtpTextfields() {
loginSecondScreenPage.validateOtpIsEmpty();
}
//page_function:
public void validateOtpIsEmpty() {
otpTextFields.waitUntilVisible();
String a=otpTextFields.getText();
Assert.assertTrue(a.equals(""));
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I see empty OTP textfields
###
response:
//step_function:
public void validateEmptyOtpTextfields() {
loginSecondScreenPage.validateOtpIsEmpty();
}
//... |
LoginSecondScreenSteps.java | I choose to Resend OTP | public void resendOtp() {
loginSecondScreenPage.resendOtp();
} | public void resendOtp() {
clickOn(resendButton);
} | @When("^I choose to Resend OTP$")
public void resendOtp() {
loginSecondScreenPage.resendOtp();
} | //step_function:
public void resendOtp() {
loginSecondScreenPage.resendOtp();
}
//page_function:
public void resendOtp() {
clickOn(resendButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I choose to Resend OTP
###
response:
//step_function:
public void resendOtp() {
loginSecondScreenPage.resendOtp();
}
//page_function:
public void res... |
LoginSecondScreenSteps.java | After fetching data from data file )?I should get a masking on (email|mobile number) (.* | public void maskedEmailOrMobileNumber(String file, String emailOrMobile, String value) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file"))) {
value=commonPage.fetchDataFromDataProperties(value);
}
if(emailOrMobile.equalsIgnoreCase("email"))
loginSecondScreenPage.valid... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @Then("^(After fetching data from data file )?I should get a masking on (email|mobile number) (.*)$")
public void maskedEmailOrMobileNumber(String file, String emailOrMobile, String value) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file"))) {
value=commonPage.fetchDataFromD... | //step_function:
public void maskedEmailOrMobileNumber(String file, String emailOrMobile, String value) throws FileNotFoundException, IOException {
if((file!=null) && (file.contains("data file"))) {
value=commonPage.fetchDataFromDataProperties(value);
}
if(emailOrMobile.equalsIgnoreCase("email"))
loginSecon... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I should get a masking on (email|mobile number) (.*
###
response:
//step_function:
public void maskedEmailOrMobileNu... |
SignUpFirstScreenSteps.java | After fetching data from data file )?I enter all the details for signing up in Signup Screen-1 | public void enterFirstScreenSignUpDetails(String file,DataTable dataTable) throws IOException {
List<List<String>> data = dataTable.raw();
signUpFirstPage.enterFirstName(data.get(0).get(0));
signUpFirstPage.enterLastName(data.get(0).get(1));
if((file!=null)&&(file.contains("data file")))... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I enter all the details for signing up in Signup Screen-1$")
public void enterFirstScreenSignUpDetails(String file,DataTable dataTable) throws IOException {
List<List<String>> data = dataTable.raw();
signUpFirstPage.enterFirstName(data.get(0).get(0));
... | //step_function:
public void enterFirstScreenSignUpDetails(String file,DataTable dataTable) throws IOException {
List<List<String>> data = dataTable.raw();
signUpFirstPage.enterFirstName(data.get(0).get(0));
signUpFirstPage.enterLastName(data.get(0).get(1));
if((file!=null)&&(file.contai... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter all the details for signing up in Signup Screen-1
###
response:
//step_function:
public void enterFirstScree... |
SignUpFirstScreenSteps.java | I click on continue button in Signup Screen-1 | public void clickOnContinueButton(){
signUpFirstPage.clickOnContinue();
} | public void clickOnContinue(){
clickOn(continue_btn);
waitABit(8000);
} | @And("^I click on continue button in Signup Screen-1$")
public void clickOnContinueButton(){
signUpFirstPage.clickOnContinue();
} | //step_function:
public void clickOnContinueButton(){
signUpFirstPage.clickOnContinue();
}
//page_function:
public void clickOnContinue(){
clickOn(continue_btn);
waitABit(8000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on continue button in Signup Screen-1
###
response:
//step_function:
public void clickOnContinueButton(){
signUpFirstPage.clickOnContinue... |
SignUpFirstScreenSteps.java | After fetching data from data file )?I enter value (.*) in Signup mobile textfield | public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.enterLoginMobile(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I enter value (.*) in Signup mobile textfield$")
public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.ente... | //step_function:
public void enterEmailOrMobile(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.enterLoginMobile(value);
}
//page_function:
public String fetchDataFromDataPr... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter value (.*) in Signup mobile textfield
###
response:
//step_function:
public void enterEmailOrMobile(String f... |
SignUpFirstScreenSteps.java | After fetching data from data file )?I enter value (.*) in Signup email textfield | public void enterEmail(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.enterLoginEmail(value);
} | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I enter value (.*) in Signup email textfield$")
public void enterEmail(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.enterLoginEma... | //step_function:
public void enterEmail(String file, String value) throws Throwable {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.enterLoginEmail(value);
}
//page_function:
public String fetchDataFromDataProperties(... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I enter value (.*) in Signup email textfield
###
response:
//step_function:
public void enterEmail(String file, Stri... |
SignUpFirstScreenSteps.java | I get error message (.*) for email or mobile textfield in Signup | public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
signUpFirstPage.validateErrorMessage(expectedError);
} | public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
switch(expectedError) {
case "INVALID_MOBILE_ERROR":
expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
break;
case "INVALID_EMAIL_ERROR":
expectedError=SupReferralLoginErrorMessagesEnu... | @Then("^I get error message (.*) for email or mobile textfield in Signup$")
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
signUpFirstPage.validateErrorMessage(expectedError);
} | //step_function:
public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception {
expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
signUpFirstPage.validateErrorMessage(expectedError);
}
//page_function:
public String fetchErrorMessageConstantsfr... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I get error message (.*) for email or mobile textfield in Signup
###
response:
//step_function:
public void validateErrorForEmailOrMobileTextfield(String... |
SignUpFirstScreenSteps.java | After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup | public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.validatePrepopulatedEmailOrMobileTextfield(value);... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File(".\\data.properties")));
String value=properties.getProperty(key);
return value;
} | @When("^(After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup$")
public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=com... | //step_function:
public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
signUpFirstPage.validatePrepopulatedEmailOrMobile... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup
###
response:
//step_function:
public void vali... |
SignUpSecondScreenSteps.java | I enter all the details for signing up in Signup Screen-2 | public void enterSecondScreenDetails(DataTable dataTable) {
List<List<String>> data = dataTable.raw();
signUpSecondScreenPage.enterAddress1(data.get(0).get(0));
signUpSecondScreenPage.enterAddress2(data.get(0).get(1));
signUpSecondScreenPage.enterZipCode(data.get(0).get(2));
// si... | public void enterAddress1(String address1) {
enter(address1).into(address1_txt);
} | @When("^I enter all the details for signing up in Signup Screen-2$")
public void enterSecondScreenDetails(DataTable dataTable) {
List<List<String>> data = dataTable.raw();
signUpSecondScreenPage.enterAddress1(data.get(0).get(0));
signUpSecondScreenPage.enterAddress2(data.get(0).get(1));
... | //step_function:
public void enterSecondScreenDetails(DataTable dataTable) {
List<List<String>> data = dataTable.raw();
signUpSecondScreenPage.enterAddress1(data.get(0).get(0));
signUpSecondScreenPage.enterAddress2(data.get(0).get(1));
signUpSecondScreenPage.enterZipCode(data.get(0).get(... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter all the details for signing up in Signup Screen-2
###
response:
//step_function:
public void enterSecondScreenDetails(DataTable dataTable) {
... |
SignUpSecondScreenSteps.java | I click on continue button in Signup Screen-2 | public void ClickOnContinue() {
signUpSecondScreenPage.clickOnContinue();
} | public void clickOnContinue(){
clickOn(continue_btn);
} | @And("^I click on continue button in Signup Screen-2$")
public void ClickOnContinue() {
signUpSecondScreenPage.clickOnContinue();
} | //step_function:
public void ClickOnContinue() {
signUpSecondScreenPage.clickOnContinue();
}
//page_function:
public void clickOnContinue(){
clickOn(continue_btn);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on continue button in Signup Screen-2
###
response:
//step_function:
public void ClickOnContinue() {
signUpSecondScreenPage.clickOnContin... |
SignUpSecondScreenSteps.java | I enter the incorrect OTP (.*) in Signup screen | public void enterIncorrectOTP(String incorrectOtp) {
signUpSecondScreenPage.enterOtp(incorrectOtp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | @When("^I enter the incorrect OTP (.*) in Signup screen$")
public void enterIncorrectOTP(String incorrectOtp) {
signUpSecondScreenPage.enterOtp(incorrectOtp);
} | //step_function:
public void enterIncorrectOTP(String incorrectOtp) {
signUpSecondScreenPage.enterOtp(incorrectOtp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the incorrect OTP (.*) in Signup screen
###
response:
//step_function:
public void enterIncorrectOTP(String incorrectOtp) {
signUpSecondS... |
SignUpSecondScreenSteps.java | I (dont )?get error message (.*) for OTP textfields in Signup | public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
signUpSecondScreenPage.validateNoErrorMessage();
}
else {
expectedError=commonPage.fetchErrorMess... | public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
switch(expectedError) {
case "INVALID_MOBILE_ERROR":
expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
break;
case "INVALID_EMAIL_ERROR":
expectedError=SupReferralLoginErrorMessagesEnu... | @Then("^I (dont )?get error message (.*) for OTP textfields in Signup$")
public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
signUpSecondScreenPage.validateNoErrorMessage();
... | //step_function:
public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
if((dontFlag!=null)&&(dontFlag.contains("dont"))) {
expectedError=null;
signUpSecondScreenPage.validateNoErrorMessage();
}
else {
expectedError=commonPa... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I (dont )?get error message (.*) for OTP textfields in Signup
###
response:
//step_function:
public void validateErrorMeesage(String dontFlag, String exp... |
SignUpSecondScreenSteps.java | I choose to Go Back in Signup | public void goBack() {
signUpSecondScreenPage.goBack();
} | public void goBack() {
goBack.click();
} | @When("^I choose to Go Back in Signup$")
public void goBack() {
signUpSecondScreenPage.goBack();
} | //step_function:
public void goBack() {
signUpSecondScreenPage.goBack();
}
//page_function:
public void goBack() {
goBack.click();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I choose to Go Back in Signup
###
response:
//step_function:
public void goBack() {
signUpSecondScreenPage.goBack();
}
//page_function:
publ... |
SignUpSecondScreenSteps.java | I see empty OTP textfields in Signup | public void validateEmptyOtpTextfields() {
signUpSecondScreenPage.validateOtpIsEmpty();
} | public void validateOtpIsEmpty() {
String a=otpTextFields.getText();
Assert.assertTrue(a.equals(""));
} | @Then("^I see empty OTP textfields in Signup$")
public void validateEmptyOtpTextfields() {
signUpSecondScreenPage.validateOtpIsEmpty();
} | //step_function:
public void validateEmptyOtpTextfields() {
signUpSecondScreenPage.validateOtpIsEmpty();
}
//page_function:
public void validateOtpIsEmpty() {
String a=otpTextFields.getText();
Assert.assertTrue(a.equals(""));
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I see empty OTP textfields in Signup
###
response:
//step_function:
public void validateEmptyOtpTextfields() {
signUpSecondScreenPage.validateOtp... |
SignUpSecondScreenSteps.java | I choose to Resend OTP in Signup | public void resendOtp() {
signUpSecondScreenPage.resendOtp();
}
} | public void resendOtp() {
clickOn(resendButton);
} | @When("^I choose to Resend OTP in Signup$")
public void resendOtp() {
signUpSecondScreenPage.resendOtp();
}
} | //step_function:
public void resendOtp() {
signUpSecondScreenPage.resendOtp();
}
}
//page_function:
public void resendOtp() {
clickOn(resendButton);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I choose to Resend OTP in Signup
###
response:
//step_function:
public void resendOtp() {
signUpSecondScreenPage.resendOtp();
}
}
//page_fu... |
YOPMailSteps.java | I click on Submit button on SignUp Page | public void clickOnSubmit() {
signupOTPPage.submitLogin();
}
} | public void submitLogin() {
getStarted.click();
waitABit(10000);
} | @And("^I click on Submit button on SignUp Page$")
public void clickOnSubmit() {
signupOTPPage.submitLogin();
}
} | //step_function:
public void clickOnSubmit() {
signupOTPPage.submitLogin();
}
}
//page_function:
public void submitLogin() {
getStarted.click();
waitABit(10000);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on Submit button on SignUp Page
###
response:
//step_function:
public void clickOnSubmit() {
signupOTPPage.submitLogin();
}
}
//pag... |
BillingSteps.java | I change rows per page | public void change_rows() {
billingPage.changeRows();
} | public void changeRows() {
waitFor(rowsPerPage);
if(rowsPerPage.isEnabled()){
clickOn(rowsPerPage);
clickOn(tenrows);
clickOn(rowsPerPage);
clickOn(twentyfiverows);
} | @When("^I change rows per page$")
public void change_rows() {
billingPage.changeRows();
} | //step_function:
public void change_rows() {
billingPage.changeRows();
}
//page_function:
public void changeRows() {
waitFor(rowsPerPage);
if(rowsPerPage.isEnabled()){
clickOn(rowsPerPage);
clickOn(tenrows);
clickOn(rowsPerPage);
clickOn(twentyfiverows);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I change rows per page
###
response:
//step_function:
public void change_rows() {
billingPage.changeRows();
}
//page_function:
public void changeRows... |
BillingSteps.java | I click on (.*) page | public void change_page(String page) {
billingPage.changePage(page);
} | public void changePage(String page) {
if(page.contains("Next") & nextPage.isEnabled())
clickOn(nextPage);
if(page.contains("Last") & lastPage.isEnabled())
clickOn(lastPage);
if(page.contains("Previous") & previousPage.isEnabled())
clickOn(previousPage);
... | @When("^I click on (.*) page$")
public void change_page(String page) {
billingPage.changePage(page);
} | //step_function:
public void change_page(String page) {
billingPage.changePage(page);
}
//page_function:
public void changePage(String page) {
if(page.contains("Next") & nextPage.isEnabled())
clickOn(nextPage);
if(page.contains("Last") & lastPage.isEnabled())
clickOn(lastPage... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on (.*) page
###
response:
//step_function:
public void change_page(String page) {
billingPage.changePage(page);
}
//page_function:
public vo... |
BillingSteps.java | I change to (.*) filter | public void change_filter(String filter) {
billingPage.changeFilter(filter);
} | public void changeFilter(String filter){
if(filter.contains("1M"))
clickOn(oneMonthFilter);
else if(filter.contains("6M"))
clickOn(sixMonthFilter);
else if(filter.contains("1Y"))
clickOn(oneYearFilter);
} | @When("^I change to (.*) filter$")
public void change_filter(String filter) {
billingPage.changeFilter(filter);
} | //step_function:
public void change_filter(String filter) {
billingPage.changeFilter(filter);
}
//page_function:
public void changeFilter(String filter){
if(filter.contains("1M"))
clickOn(oneMonthFilter);
else if(filter.contains("6M"))
clickOn(sixMonthFilter);
else if... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I change to (.*) filter
###
response:
//step_function:
public void change_filter(String filter) {
billingPage.changeFilter(filter);
}
//page_function... |
BillingSteps.java | After fetching data from data file )I search for (.*) in search box | public void searchItem(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
billingPage.searchItem(file, search);
} | public void searchItem(String file, String search){
if (file=="searchId") {
waitFor(invoice_entry);
typeInto(search_txt, search);
search_txt.sendKeys(Keys.ENTER);
waitFor(3000);
assertEquals(invoice_entry.getText(), search);
} | @Then("^(After fetching data from data file )I search for (.*) in search box$")
public void searchItem(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
billingPage.searchItem(file, search);
} | //step_function:
public void searchItem(String file, String search) throws IOException {
if((file!=null)&&(file.contains("data file")))
search=commonPage.fetchDataFromDataProperties(search);
billingPage.searchItem(file, search);
}
//page_function:
public void searchItem(String file, String search){
if ... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )I search for (.*) in search box
###
response:
//step_function:
public void searchItem(String file, String search) thr... |
BillingSteps.java | After fetching data from data file)? I click on Billing history table reccords(.* | public void ICLickOnPropertyName(String file, String value) throws InterruptedException, FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
billingPage.clickOnArrowToOpenProjectTable(value);
} | public void clickOnArrowToOpenProjectTable(String PName){
String buttonXpath=String.format(parameterizedTab, PName);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
waitFor(elem);
clickOn(elem);
} | @And("^(After fetching data from data file)? I click on Billing history table reccords(.*)$")
public void ICLickOnPropertyName(String file, String value) throws InterruptedException, FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(val... | //step_function:
public void ICLickOnPropertyName(String file, String value) throws InterruptedException, FileNotFoundException, IOException {
if((file!=null)&&(file.contains("data file")))
value=commonPage.fetchDataFromDataProperties(value);
billingPage.clickOnArrowToOpenProjectTable(value);
}
//page_funct... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file)? I click on Billing history table reccords(.*
###
response:
//step_function:
public void ICLickOnPropertyName(String ... |
BillingSteps.java | I successfully download the Bill | public void downloadBill() {
billingPage.downloadBill();
}
} | public void downloadBill() {
clickOn(download_button);
String downloadPath = "C:\\Users\\siddharth.rawat\\Downloads";
File file = new File(downloadPath);
if (file.exists()) {
System.out.println(downloadPath + " is present");
} | @Then("^I successfully download the Bill$")
public void downloadBill() {
billingPage.downloadBill();
}
} | //step_function:
public void downloadBill() {
billingPage.downloadBill();
}
}
//page_function:
public void downloadBill() {
clickOn(download_button);
String downloadPath = "C:\\Users\\siddharth.rawat\\Downloads";
File file = new File(downloadPath);
if (file.exists()) {
Sy... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I successfully download the Bill
###
response:
//step_function:
public void downloadBill() {
billingPage.downloadBill();
}
}
//page_function:
public ... |
BrowserControlSteps.java | I close the browser | public void closeBrowser(){
browserControlPage.closeBrowser();
}
} | public void closeBrowser(){
getDriver().close();
} | @And("I close the browser")
public void closeBrowser(){
browserControlPage.closeBrowser();
}
} | //step_function:
public void closeBrowser(){
browserControlPage.closeBrowser();
}
}
//page_function:
public void closeBrowser(){
getDriver().close();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I close the browser
###
response:
//step_function:
public void closeBrowser(){
browserControlPage.closeBrowser();
}
}
//page_function:
publi... |
CommonSteps.java | I wait for (\\d+) seconds | public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
} | public void waitForSometime(int duration) {
waitABit(duration);
} | @When("^I wait for (\\d+) seconds$")
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
} | //step_function:
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
}
//page_function:
public void waitForSometime(int duration) {
waitABit(duration);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I wait for (\\d+) seconds
###
response:
//step_function:
public void waitForDuration(int duration) {
commonPage.waitForSometime(duration*1000);
}
... |
CommonSteps.java | I click outside | public void clickOutside() {
commonPage.clickOutside();
} | public void clickOutside() {
outside.click();
} | @When("^I click outside$")
public void clickOutside() {
commonPage.clickOutside();
} | //step_function:
public void clickOutside() {
commonPage.clickOutside();
}
//page_function:
public void clickOutside() {
outside.click();
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click outside
###
response:
//step_function:
public void clickOutside() {
commonPage.clickOutside();
}
//page_function:
public void clickOutside() ... |
CommonSteps.java | I click on (.*) tab | public void clickTab(String tabText) {
commonPage.clickTab(tabText);
} | public void clickTab(String tabText) {
String buttonXpath=String.format(parameterizedTab, tabText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getDriver(),10);
wait.until(ExpectedConditions.elementToBeClickable(elem));
elem.click();
} | @Then("^I click on (.*) tab$")
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
} | //step_function:
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
}
//page_function:
public void clickTab(String tabText) {
String buttonXpath=String.format(parameterizedTab, tabText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getD... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on (.*) tab
###
response:
//step_function:
public void clickTab(String tabText) {
commonPage.clickTab(tabText);
}
//page_function:
public voi... |
CommonSteps.java | I click on (.*) button | public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
} | public void clickButton(String buttonText) {
String buttonXpath=String.format(parameterizedButton, buttonText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wait=new WebDriverWait(getDriver(),15);
wait.until(ExpectedConditions.elementToBeClickable(elem));
elem.click();
} | @Then("^I click on (.*) button$")
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
} | //step_function:
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
}
//page_function:
public void clickButton(String buttonText) {
String buttonXpath=String.format(parameterizedButton, buttonText);
WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
WebDriverWait wai... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I click on (.*) button
###
response:
//step_function:
public void clickButton(String buttonText) {
commonPage.clickButton(buttonText);
}
//page_funct... |
CommonSteps.java | After fetching data from data file )?I fetch OTP of Email (.* | public String getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((file!=null) && (file.contains("data file")))
email=commonPage.fetchDat... | public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
properties=new Properties();
properties.load(new FileInputStream(new File("./data.properties")));
String value=properties.getProperty(key);
return value;
} | @And("^(After fetching data from data file )?I fetch OTP of Email (.*)$")
public String getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((... | //step_function:
public String getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException {
yopMailHomePage.openNewTabAndSwitch();
yopMailHomePage.getDriver().get("https://yopmail.com/en/");
if((file!=null) && (file.contains("data file")))
email=co... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
After fetching data from data file )?I fetch OTP of Email (.*
###
response:
//step_function:
public String getEmailOtp(String file, String email) throws ... |
CommonSteps.java | I enter the correct OTP in Login screen( but the old one| but the expired one)? | public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
waitABit(200);
typeInto(otpTextFields,correctOtp);
} | @And("^I enter the correct OTP in Login screen( but the old one| but the expired one)?$")
public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
} | //step_function:
public void enterCorrectlyFetchedOtp(String oldOrNew) {
loginSecondScreenPage.enterOtp(otp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.clear();
otpTextFields.cle... | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the correct OTP in Login screen( but the old one| but the expired one)?
###
response:
//step_function:
public void enterCorrectlyFetchedOtp(Strin... |
CommonSteps.java | I enter the correct OTP in SignUp screen | public void enterOTP(){
signupOTPPage.enterOtp(otp);
} | public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | @And("^I enter the correct OTP in SignUp screen$")
public void enterOTP(){
signupOTPPage.enterOtp(otp);
} | //step_function:
public void enterOTP(){
signupOTPPage.enterOtp(otp);
}
//page_function:
public void enterOtp(String correctOtp) {
waitFor(otpTextFields);
typeInto(otpTextFields,correctOtp);
} | As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction.
###
instruction:
I enter the correct OTP in SignUp screen
###
response:
//step_function:
public void enterOTP(){
signupOTPPage.enterOtp(otp);
}
//page_functi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.