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
CommonSteps.java
I validate dashboard shows (.*) message
public void validateTextPresent(String msg){ commonPage.validateTextPresent(msg); }
public void validateTextPresent(String msg) { String path=String.format(message, msg); WebElement elem=getDriver().findElement(By.xpath(path)); assertTrue(elem.isDisplayed()); }
@Then("^I validate dashboard shows (.*) message$") public void validateTextPresent(String msg){ commonPage.validateTextPresent(msg); }
//step_function: public void validateTextPresent(String msg){ commonPage.validateTextPresent(msg); } //page_function: public void validateTextPresent(String msg) { String path=String.format(message, msg); WebElement elem=getDriver().findElement(By.xpath(path)); assertTrue(elem.isDisplayed()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I validate dashboard shows (.*) message ### response: //step_function: public void validateTextPresent(String msg){ commonPage.validateTextPresent(msg)...
CommonSteps.java
I zoom out in browser
public void zoomOut() throws AWTException{ commonPage.zoomOut(); } }
public void zoomOut() throws AWTException { Robot robot=new Robot(); robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_SUBTRACT); robot.keyRelease(KeyEvent.VK_SUBTRACT); robot.keyRelease(KeyEvent.VK_CONTROL); }
@Then("^I zoom out in browser$") public void zoomOut() throws AWTException{ commonPage.zoomOut(); } }
//step_function: public void zoomOut() throws AWTException{ commonPage.zoomOut(); } } //page_function: public void zoomOut() throws AWTException { Robot robot=new Robot(); robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_SUBTRACT); robot.keyRelease(KeyEvent.VK_SUBTRACT); robot.keyRelease...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I zoom out in browser ### response: //step_function: public void zoomOut() throws AWTException{ commonPage.zoomOut(); } } //page_function: public ...
DashboardAPISteps.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...
DashboardAPISteps.java
After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) (project|location))?
public String preparePayload(String file, String email, String apiName, String anyProjectOrLocation, String specificProjectOrLocations, String projectOrlocation) throws Exception { if((file!=null) && (file.contains("data file"))) { email=commonPage.fetchDataFromDataProperties(email); } ...
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|location))?$") public String preparePayload(String file, String email, String apiName, String anyProjectOrLocation, String specificProjectOrLocations, String projectOrlocation) throws Exception { if(...
//step_function: public String preparePayload(String file, String email, String apiName, String anyProjectOrLocation, String specificProjectOrLocations, String projectOrlocation) throws Exception { if((file!=null) && (file.contains("data file"))) { email=commonPage.fetchDataFromDataProperties(email...
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|location))? ### response: //step_function: public ...
DashboardAPISteps.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.ind...
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...
DashboardAPISteps.java
After fetching data from data file )?I set request specification with the (.*) API (for customer id \\d+ )?with headers and payload
public void add_API_Payload(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 and payload$") public void add_API_Payload(String file, String apiURL, String customerId) throws IOException { if((file!=null) && (file.contains("data file"))) { apiURL=...
//step_function: public void add_API_Payload(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(...
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 and payload ### response: //step_...
DashboardAPISteps.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...
DashboardAPISteps.java
I verify fuel details on property overview page and dataHealth dashboard Api are same
public void GivenIVerifyFuelDetailsOnPropertyOverviewPageAndDataHealthDashboardApiAreSame() throws Exception { String fuelType=propertyDetailsPage.getFuelUsageText(); System.out.println(fuelType); HashMap<String, String> fuelDetails=response.jsonPath().get("dashboardData[0].fuelDetails"); ...
public String getFuelUsageText() { return fuelUsageType.getText(); }
@Given("I verify fuel details on property overview page and dataHealth dashboard Api are same$") public void GivenIVerifyFuelDetailsOnPropertyOverviewPageAndDataHealthDashboardApiAreSame() throws Exception { String fuelType=propertyDetailsPage.getFuelUsageText(); System.out.println(fuelType); H...
//step_function: public void GivenIVerifyFuelDetailsOnPropertyOverviewPageAndDataHealthDashboardApiAreSame() throws Exception { String fuelType=propertyDetailsPage.getFuelUsageText(); System.out.println(fuelType); HashMap<String, String> fuelDetails=response.jsonPath().get("dashboardData[0].fue...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify fuel details on property overview page and dataHealth dashboard Api are same ### response: //step_function: public void GivenIVerifyFuelDetailsO...
DashboardAPISteps.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...
DashboardAPISteps.java
After fetching data from data file)? I verify correct (.*) assign to (.*
public void ThenAfterFetchingDataFromDataFileIVerifyCorectProjectIdsAssignToLocationId(String file, String keyProjectID,String keyLocationId) throws FileNotFoundException, IOException { String valueProjectID=""; String valueLocationId=""; if((file!=null) && (file.contains("data file"))) { for...
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 verify correct (.*) assign to (.*)$") public void ThenAfterFetchingDataFromDataFileIVerifyCorectProjectIdsAssignToLocationId(String file, String keyProjectID,String keyLocationId) throws FileNotFoundException, IOException { String valueProjectID=""; String va...
//step_function: public void ThenAfterFetchingDataFromDataFileIVerifyCorectProjectIdsAssignToLocationId(String file, String keyProjectID,String keyLocationId) throws FileNotFoundException, IOException { String valueProjectID=""; String valueLocationId=""; if((file!=null) && (file.contains("data file...
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 verify correct (.*) assign to (.* ### response: //step_function: public void ThenAfterFetchingDataFromDataFileIVer...
DashboardAPISteps.java
After fetching data from data file )?I verify (.*) generation with (.*
public void verify_total_generation(String file, String key,String totalgen) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); value=getJsonPath(...
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 verify (.*) generation with (.*)$") public void verify_total_generation(String file, String key,String totalgen) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value...
//step_function: public void verify_total_generation(String file, String key,String totalgen) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); v...
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 verify (.*) generation with (.* ### response: //step_function: public void verify_total_generation(String file, St...
DashboardAPISteps.java
After fetching data from data file )?I verify (.*) sunshine factor with (.*
public void verify_sunshine_factor(String file, String key,String totalSunshine) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); value=getJsonP...
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 verify (.*) sunshine factor with (.*)") public void verify_sunshine_factor(String file, String key,String totalSunshine) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); Stri...
//step_function: public void verify_sunshine_factor(String file, String key,String totalSunshine) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); ...
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 verify (.*) sunshine factor with (.* ### response: //step_function: public void verify_sunshine_factor(String file...
DashboardAPISteps.java
After fetching data from data file )?I verify (.*) rides saved with (.*
public void verifyRidesSaved(String file, String key,String totalRidesSaved) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); value=getJsonPath(...
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 verify (.*) rides saved with (.*)$") public void verifyRidesSaved(String file, String key,String totalRidesSaved) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String valu...
//step_function: public void verifyRidesSaved(String file, String key,String totalRidesSaved) throws IOException { if((file!=null) && (file.contains("data file"))) key=commonPage.fetchDataFromDataProperties(key); String value=getJsonPath(response,key); int l=value.length(); v...
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 verify (.*) rides saved with (.* ### response: //step_function: public void verifyRidesSaved(String file, String k...
DashboardAPISteps.java
I fetch value of (.*) from response of (.*) API and write to data file
public void writeToDataFileFromResponse(String key, String apiName) throws IOException { String value=getJsonPath(response,key); if(apiName.contains("history")) { docId=value; System.out.println("doc id value is: "+docId); commonPage.writeToDataProperties(docId); } }
public void writeToDataProperties(String value) throws IOException { properties=new Properties(); properties.put("docId", value); outputStream = new FileOutputStream(".\\data.properties"); properties.replace("docId", value); properties.store(outputStream, "docId Stored successfully!!"); }
@When("^I fetch value of (.*) from response of (.*) API and write to data file$") public void writeToDataFileFromResponse(String key, String apiName) throws IOException { String value=getJsonPath(response,key); if(apiName.contains("history")) { docId=value; System.out.println("doc id va...
//step_function: public void writeToDataFileFromResponse(String key, String apiName) throws IOException { String value=getJsonPath(response,key); if(apiName.contains("history")) { docId=value; System.out.println("doc id value is: "+docId); commonPage.writeToDataProperties(docId);...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I fetch value of (.*) from response of (.*) API and write to data file ### response: //step_function: public void writeToDataFileFromResponse(String key,...
DashboardAPISteps.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...
DashboardScreenSteps.java
I should successfully land to dashboard
public void reachedDashboard(){ dashboardPage.reachedDashboard(); }
public void reachedDashboard() { waitFor(logoutLink); }
@Then("^I should successfully land to dashboard$") public void reachedDashboard(){ dashboardPage.reachedDashboard(); }
//step_function: public void reachedDashboard(){ dashboardPage.reachedDashboard(); } //page_function: public void reachedDashboard() { waitFor(logoutLink); }
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 reachedDashboard(){ dashboardPage.reachedDashboard(); } //pa...
DashboardScreenSteps.java
I click on Sign Out on dashboard
public void clickSignOut(){ dashboardPage.signOut(); }
public void signOut() { waitFor(logoutLink); clickOn(logoutLink); }
@When("^I click on Sign Out on dashboard$") public void clickSignOut(){ dashboardPage.signOut(); }
//step_function: public void clickSignOut(){ dashboardPage.signOut(); } //page_function: public void signOut() { waitFor(logoutLink); clickOn(logoutLink); }
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 Sign Out on dashboard ### response: //step_function: public void clickSignOut(){ dashboardPage.signOut(); } //page_function: public ...
DashboardScreenSteps.java
I verify that (project|location) dropdown list is same as list of individual (projects|locations) in dashboard
public void verifyProjectLists(String projectOrLocationsDropdown, String individualProjectsOrLocations){ if((projectOrLocationsDropdown.contains("project"))&&(individualProjectsOrLocations.contains("project"))) { dashboardPage.verifyProjectLists(); }else if((projectOrLocationsDropdown.contains("location...
public void verifyProjectLists() { waitFor(findAProjectOrLocationDropdown); findAProjectOrLocation = getDriver().findElement(By.xpath("//div[@id='demo-simple-select-outlined']/span")); System.out.println("Project dropdown is: " + findAProjectOrLocation.isEnabled()); assertTrue(findAProjectOrLocation.isEnabled()...
@Then("^I verify that (project|location) dropdown list is same as list of individual (projects|locations) in dashboard$") public void verifyProjectLists(String projectOrLocationsDropdown, String individualProjectsOrLocations){ if((projectOrLocationsDropdown.contains("project"))&&(individualProjectsOrLocations.cont...
//step_function: public void verifyProjectLists(String projectOrLocationsDropdown, String individualProjectsOrLocations){ if((projectOrLocationsDropdown.contains("project"))&&(individualProjectsOrLocations.contains("project"))) { dashboardPage.verifyProjectLists(); }else if((projectOrLocationsDropdown.c...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify that (project|location) dropdown list is same as list of individual (projects|locations) in dashboard ### response: //step_function: public void...
DashboardScreenSteps.java
I verify the individual (projects|locations) in dashboard
public void verifyIndividualProjects(String projectOrLocation) { if(projectOrLocation.contains("project")) { dashboardPage.verifyIndividualProjects(); } else if(projectOrLocation.contains("location")) { dashboardPage.verifyIndividualLocations(); } }
public void verifyIndividualProjects(){ individualProjectList = getDriver().findElements(By.xpath("//p[@class='MuiTypography-root MuiTypography-body1 css-fb8gxk']")); for (int i = 0; i < individualProjectList.size(); i++) { System.out.println("individual project " + i + " : " + individualProjectList.get(i).getTe...
@Then("^I verify the individual (projects|locations) in dashboard$") public void verifyIndividualProjects(String projectOrLocation) { if(projectOrLocation.contains("project")) { dashboardPage.verifyIndividualProjects(); } else if(projectOrLocation.contains("location")) { dashboardPage.verifyIndivi...
//step_function: public void verifyIndividualProjects(String projectOrLocation) { if(projectOrLocation.contains("project")) { dashboardPage.verifyIndividualProjects(); } else if(projectOrLocation.contains("location")) { dashboardPage.verifyIndividualLocations(); } } //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: I verify the individual (projects|locations) in dashboard ### response: //step_function: public void verifyIndividualProjects(String projectOrLocation) {...
DashboardScreenSteps.java
I verify that (project|location) dropdown list (projects|locations) in dashboard
public void verifyLeftPannelProjects(String locationOrProjectDropdown, String projectsOrLocations) { dashboardPage.verifyLeftPannelProjectsOrLocations(); }
public void verifyLeftPannelProjectsOrLocations(){ waitFor(findAProjectOrLocationDropdown); findAProjectOrLocation = getDriver().findElement(By.xpath("//div[@id='demo-simple-select-outlined']/span")); List<String> findAProjectTexts=new ArrayList<String>(); System.out.println("Project dropdown is: " + findAProje...
@Then("^I verify that (project|location) dropdown list (projects|locations) in dashboard$") public void verifyLeftPannelProjects(String locationOrProjectDropdown, String projectsOrLocations) { dashboardPage.verifyLeftPannelProjectsOrLocations(); }
//step_function: public void verifyLeftPannelProjects(String locationOrProjectDropdown, String projectsOrLocations) { dashboardPage.verifyLeftPannelProjectsOrLocations(); } //page_function: public void verifyLeftPannelProjectsOrLocations(){ waitFor(findAProjectOrLocationDropdown); findAProjectOrLocatio...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify that (project|location) dropdown list (projects|locations) in dashboard ### response: //step_function: public void verifyLeftPannelProjects(Stri...
DashboardScreenSteps.java
I click on the (Carbon|Billing|Data Health|Income|Documents|\'Help And Support\') button in left panel of dashboard
public void click_Carbon_Billing(String value) { if(value.contains("Carbon")) dashboardPage.clickCarbon(); else if(value.contains("Billing")) dashboardPage.clickBilling(); else if(value.contains("Data Health")) dashboardPage.clickDataHealth(); else if(...
public void clickCarbon() { waitFor(carbonButton); clickOn(carbonButton); }
@Then("^I click on the (Carbon|Billing|Data Health|Income|Documents|\'Help And Support\') button in left panel of dashboard$") public void click_Carbon_Billing(String value) { if(value.contains("Carbon")) dashboardPage.clickCarbon(); else if(value.contains("Billing")) dashboardPa...
//step_function: public void click_Carbon_Billing(String value) { if(value.contains("Carbon")) dashboardPage.clickCarbon(); else if(value.contains("Billing")) dashboardPage.clickBilling(); else if(value.contains("Data Health")) dashboardPage.clickDataHealth();...
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 (Carbon|Billing|Data Health|Income|Documents|\'Help And Support\') button in left panel of dashboard ### response: //step_function: public...
DashboardScreenSteps.java
I verify Project list for (Carbon|Billing
public void verifyCarbon_Billing_IndividualProjects(String value) { dashboardPage.verifyCarbon_Billing_IndividualProjects(value); }
public void verifyCarbon_Billing_IndividualProjects(String value) { waitFor(findAProjectOrLocationDropdown); findAProjectOrLocation = getDriver().findElement(By.xpath("(//div[@id='demo-simple-select-outlined'])[2]")); List<String> findAProjectTexts=new ArrayList<String>(); System.out.println("Project dropdown i...
@Then("^I verify Project list for (Carbon|Billing)$") public void verifyCarbon_Billing_IndividualProjects(String value) { dashboardPage.verifyCarbon_Billing_IndividualProjects(value); }
//step_function: public void verifyCarbon_Billing_IndividualProjects(String value) { dashboardPage.verifyCarbon_Billing_IndividualProjects(value); } //page_function: public void verifyCarbon_Billing_IndividualProjects(String value) { waitFor(findAProjectOrLocationDropdown); findAProjectOrLocation = 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 verify Project list for (Carbon|Billing ### response: //step_function: public void verifyCarbon_Billing_IndividualProjects(String value) { dash...
DashboardScreenSteps.java
I verify No payment available is displayed
public void verifyNoPaymentavailable() { dashboardPage.verifyNoPaymentavailable(); }
public void verifyNoPaymentavailable() { waitFor(noPaymentText); assertEquals(noPaymentText.getText(), "No payment available"); }
@Then("^I verify No payment available is displayed$") public void verifyNoPaymentavailable() { dashboardPage.verifyNoPaymentavailable(); }
//step_function: public void verifyNoPaymentavailable() { dashboardPage.verifyNoPaymentavailable(); } //page_function: public void verifyNoPaymentavailable() { waitFor(noPaymentText); assertEquals(noPaymentText.getText(), "No payment available"); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify No payment available is displayed ### response: //step_function: public void verifyNoPaymentavailable() { dashboardPage.verifyNoPaymenta...
DashboardScreenSteps.java
I verify No document available is displayed
public void verifyNoDocumentavailable() { dashboardPage.verifyNoDocumentavailable(); }
public void verifyNoDocumentavailable() { waitFor(noDocumentText); assertEquals(noDocumentText.getText(), "No document available"); }
@Then("^I verify No document available is displayed$") public void verifyNoDocumentavailable() { dashboardPage.verifyNoDocumentavailable(); }
//step_function: public void verifyNoDocumentavailable() { dashboardPage.verifyNoDocumentavailable(); } //page_function: public void verifyNoDocumentavailable() { waitFor(noDocumentText); assertEquals(noDocumentText.getText(), "No document available"); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify No document available is displayed ### response: //step_function: public void verifyNoDocumentavailable() { dashboardPage.verifyNoDocume...
DashboardScreenSteps.java
I click on (tenant|landlord) tab of side navigation bar
public void clickTenantLandlordTab(String tenantOrLandlordTab) { if(tenantOrLandlordTab.toLowerCase().contains("tenant")) { dashboardPage.clickTenantTab(); }else if(tenantOrLandlordTab.toLowerCase().contains("landlord")) { dashboardPage.clickLandlordTab(); } } }
public void clickTenantTab() { waitFor(tenantTab); clickOn(tenantTab); }
@When("^I click on (tenant|landlord) tab of side navigation bar$") public void clickTenantLandlordTab(String tenantOrLandlordTab) { if(tenantOrLandlordTab.toLowerCase().contains("tenant")) { dashboardPage.clickTenantTab(); }else if(tenantOrLandlordTab.toLowerCase().contains("landlord")) { ...
//step_function: public void clickTenantLandlordTab(String tenantOrLandlordTab) { if(tenantOrLandlordTab.toLowerCase().contains("tenant")) { dashboardPage.clickTenantTab(); }else if(tenantOrLandlordTab.toLowerCase().contains("landlord")) { dashboardPage.clickLandlordTab(); } ...
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 (tenant|landlord) tab of side navigation bar ### response: //step_function: public void clickTenantLandlordTab(String tenantOrLandlordTab) { ...
DataHealthSteps.java
After fetching data from data file )?I upload (.*) Utility bill document
public void uploadLmiDocument(String file, String value) throws AWTException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); dataHealthPagePage.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 (.*) Utility bill document$") public void uploadLmiDocument(String file, String value) throws AWTException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); dataHealthPagePage.uploadDocument(v...
//step_function: public void uploadLmiDocument(String file, String value) throws AWTException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); dataHealthPagePage.uploadDocument(value); } //page_function: public String fetchDataFromDataPropertie...
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 bill document ### response: //step_function: public void uploadLmiDocument(String file, String...
DataHealthSteps.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); dataHealthPagePage.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); dataHealthPagePage.selectUtilityProvider(utilityProvider); ...
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...
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...
HelpAndSupportSteps.java
After fetching data from data file )?I validate that (.*) field is prepopulated with (.*) value
public void verifyFieldIsPrepopulatedWithValue(String file, String field, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) { helpAndSupportPage.verifyFieldsPrepopulated(field, commonPage.fetchDataFromDataProperties(value)); } else{ he...
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 validate that (.*) field is prepopulated with (.*) value$") public void verifyFieldIsPrepopulatedWithValue(String file, String field, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) { helpAndSupportPage.verifyF...
//step_function: public void verifyFieldIsPrepopulatedWithValue(String file, String field, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) { helpAndSupportPage.verifyFieldsPrepopulated(field, commonPage.fetchDataFromDataProperties(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 validate that (.*) field is prepopulated with (.*) value ### response: //step_function: public void verifyFieldIsP...
HelpAndSupportSteps.java
I enter value (.*) in description textarea
public void enterDescription(String value) { helpAndSupportPage.enterEmailContent(value); }
public void enterEmailContent(String value) { typeInto(descriptionTextarea,value); }
@When("^I enter value (.*) in description textarea$") public void enterDescription(String value) { helpAndSupportPage.enterEmailContent(value); }
//step_function: public void enterDescription(String value) { helpAndSupportPage.enterEmailContent(value); } //page_function: public void enterEmailContent(String value) { typeInto(descriptionTextarea,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 value (.*) in description textarea ### response: //step_function: public void enterDescription(String value) { helpAndSupportPage.enterEmailCon...
HelpAndSupportSteps.java
I click on Request Information button on \'Help And Support\' screen
public void clickRequestInformationButton() { helpAndSupportPage.clickRequestInformationButton(); }
public void clickRequestInformationButton() { clickOn(requestInformationButton); }
@When("^I click on Request Information button on \'Help And Support\' screen$") public void clickRequestInformationButton() { helpAndSupportPage.clickRequestInformationButton(); }
//step_function: public void clickRequestInformationButton() { helpAndSupportPage.clickRequestInformationButton(); } //page_function: public void clickRequestInformationButton() { clickOn(requestInformationButton); }
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 Request Information button on \'Help And Support\' screen ### response: //step_function: public void clickRequestInformationButton() { helpA...
HelpAndSupportSteps.java
I validate that Email is successfully sent
public void validateEmailSent() { helpAndSupportPage.validateEmailSentSuccessfully(); } }
public void validateEmailSentSuccessfully() { waitFor(emailSentSuccessfullyMessage); }
@Then("^I validate that Email is successfully sent$") public void validateEmailSent() { helpAndSupportPage.validateEmailSentSuccessfully(); } }
//step_function: public void validateEmailSent() { helpAndSupportPage.validateEmailSentSuccessfully(); } } //page_function: public void validateEmailSentSuccessfully() { waitFor(emailSentSuccessfullyMessage); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I validate that Email is successfully sent ### response: //step_function: public void validateEmailSent() { helpAndSupportPage.validateEmailSentSuccess...
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=LoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); break; case "INVALID_EMAIL_ERROR": expectedError=LoginErrorMessagesEnum.INVALID_EMAIL_ERROR....
@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_SCREEN1_STATIC_TEXT_HEADING": expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue(); break; case "LOGIN_SCREEN1_SECONDARY_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_SCREEN1_STATIC_TEXT_HEADING": expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue(); break; case "LOGIN_SCREEN1_SECONDARY_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 fetchStaticTextConstants...
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...
LoginFirstScreenSteps.java
I should successfully land to Login screen
public void validateLandedOnLoginScreen() throws Exception { loginFirstScreenPage.validateLandedOnLoginScreen(); }
public void validateLandedOnLoginScreen() { waitFor(sendMeACodeButton); }
@Then("^I should successfully land to Login screen$") public void validateLandedOnLoginScreen() throws Exception { loginFirstScreenPage.validateLandedOnLoginScreen(); }
//step_function: public void validateLandedOnLoginScreen() throws Exception { loginFirstScreenPage.validateLandedOnLoginScreen(); } //page_function: public void validateLandedOnLoginScreen() { waitFor(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 should successfully land to Login screen ### response: //step_function: public void validateLandedOnLoginScreen() throws Exception { loginFirstScreen...
LoginFirstScreenSteps.java
I (dont )?give consent to send me a Code to my mobile number
public void giveOTPConsentForMobile(String dontFlag) throws Exception { if(dontFlag==null) loginFirstScreenPage.giveOTPConsentForMobile(); else loginFirstScreenPage.dontGiveOTPConsentForMobile(); } }
public void giveOTPConsentForMobile() { mobileOtpConsentCheckbox=getDriver().findElement(By.xpath("//input[@type='checkbox']")); JavascriptExecutor js=(JavascriptExecutor)getDriver(); if(!mobileOtpConsentCheckbox.isSelected()) js.executeScript("arguments[0].click();", mobileOtpConsentCheckbox); }
@Then("^I (dont )?give consent to send me a Code to my mobile number$") public void giveOTPConsentForMobile(String dontFlag) throws Exception { if(dontFlag==null) loginFirstScreenPage.giveOTPConsentForMobile(); else loginFirstScreenPage.dontGiveOTPConsentForMobile(); } }
//step_function: public void giveOTPConsentForMobile(String dontFlag) throws Exception { if(dontFlag==null) loginFirstScreenPage.giveOTPConsentForMobile(); else loginFirstScreenPage.dontGiveOTPConsentForMobile(); } } //page_function: public void giveOTPConsentForMobile() { mobileOtpConsentCheckbox=getDr...
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 )?give consent to send me a Code to my mobile number ### response: //step_function: public void giveOTPConsentForMobile(String dontFlag) throws E...
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=LoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); break; case "INVALID_EMAIL_ERROR": expectedError=LoginErrorMessagesEnum.INVALID_EMAIL_ERROR....
@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() { 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() { 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...
PropertyDetailSteps.java
I select property (.*) from dropdown
public void GivenISelectPropertyFromDropdown(String PropertyName) { propertyDetailsPage.clickOnSelectALocation(); propertyDetailsPage.selectProjectFromDropdown(PropertyName); }
public void clickOnSelectALocation() { clickOn(selectALocation); }
@Given("I select property (.*) from dropdown$") public void GivenISelectPropertyFromDropdown(String PropertyName) { propertyDetailsPage.clickOnSelectALocation(); propertyDetailsPage.selectProjectFromDropdown(PropertyName); }
//step_function: public void GivenISelectPropertyFromDropdown(String PropertyName) { propertyDetailsPage.clickOnSelectALocation(); propertyDetailsPage.selectProjectFromDropdown(PropertyName); } //page_function: public void clickOnSelectALocation() { clickOn(selectALocation); }
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 property (.*) from dropdown ### response: //step_function: public void GivenISelectPropertyFromDropdown(String PropertyName) { ...
PropertyDetailSteps.java
I navigate to property detail page
public void ThenINavigateToPropertyDetailPage() { propertyDetailsPage.varifyBreadcrumbIsPresent("Dashboard"); }
public void varifyBreadcrumbIsPresent(String BreadcrumbName) { String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); WebElement BreadcrumbEle=getDriver().findElement(By.xpath(project)); waitFor(BreadcrumbEle); Assert.isTrue(BreadcrumbEle.isDisplayed()); }
@Then("I navigate to property detail page$") public void ThenINavigateToPropertyDetailPage() { propertyDetailsPage.varifyBreadcrumbIsPresent("Dashboard"); }
//step_function: public void ThenINavigateToPropertyDetailPage() { propertyDetailsPage.varifyBreadcrumbIsPresent("Dashboard"); } //page_function: public void varifyBreadcrumbIsPresent(String BreadcrumbName) { String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); WebEle...
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 property detail page ### response: //step_function: public void ThenINavigateToPropertyDetailPage() { propertyDetailsPage....
PropertyDetailSteps.java
I verify property name (.*) in selected in dropdown and on property detail page is same
public void ThenIVarifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String propertyName) { propertyDetailsPage.varifyPropertysSelectedOnDropdownAndPageAreSame(propertyName); }
public void varifyPropertysSelectedOnDropdownAndPageAreSame(String propertyName) { String SelectedPropertyfromDropdown=String.format(parameterizedSelectedPropertyfromDropdown, propertyName); String PropertyNameOnPage=String.format(parameterizedPropertyNameOnPage, propertyName); WebElement SelectedPropertyfromDrop...
@Then("I verify property name (.*) in selected in dropdown and on property detail page is same$") public void ThenIVarifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String propertyName) { propertyDetailsPage.varifyPropertysSelectedOnDropdownAndPageAreSame(propertyName); }
//step_function: public void ThenIVarifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String propertyName) { propertyDetailsPage.varifyPropertysSelectedOnDropdownAndPageAreSame(propertyName); } //page_function: public void varifyPropertysSelectedOnDropdownAndPageAreSame(Stri...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify property name (.*) in selected in dropdown and on property detail page is same ### response: //step_function: public void ThenIVarifyPropertyNam...
PropertyDetailSteps.java
I verify title of (.*
public void ThenIVarifyTitleOfPropertDetailPageIsB2B_Location_Details(String pageName) throws Exception { String expectedTitle=propertyDetailsPage.fetchPageTitlesfromEnum(pageName); String actualTitle=propertyDetailsPage.getDriver().getTitle(); Assert.assertTrue(expectedTitle.equals(a...
public String fetchPageTitlesfromEnum(String expectedTitle) throws Exception { switch(expectedTitle) { case "property detail page": expectedTitle=LoginStaticTextsEnum.LOCATIONDETAILSPAGETITLE.getValue(); break; case "project detail page": expectedTitle=LoginStaticTextsEnum.PROJECTDETAILSPAGETITLE.getValu...
@Then("I verify title of (.*)$") public void ThenIVarifyTitleOfPropertDetailPageIsB2B_Location_Details(String pageName) throws Exception { String expectedTitle=propertyDetailsPage.fetchPageTitlesfromEnum(pageName); String actualTitle=propertyDetailsPage.getDriver().getTitle(); Assert....
//step_function: public void ThenIVarifyTitleOfPropertDetailPageIsB2B_Location_Details(String pageName) throws Exception { String expectedTitle=propertyDetailsPage.fetchPageTitlesfromEnum(pageName); String actualTitle=propertyDetailsPage.getDriver().getTitle(); Assert.assertTrue(expec...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify title of (.* ### response: //step_function: public void ThenIVarifyTitleOfPropertDetailPageIsB2B_Location_Details(String pageName) throws Except...
PropertyDetailSteps.java
I verify that total net metering panel is visible
public void ThenIVarifyTotalNetMeteringPanelIsVisible() { propertyDetailsPage.varifyTotalNetMeteringIsVisible(); }
public void varifyTotalNetMeteringIsVisible() { Assert.isTrue(totalNetMetering.isVisible()); }
@Then("I verify that total net metering panel is visible$") public void ThenIVarifyTotalNetMeteringPanelIsVisible() { propertyDetailsPage.varifyTotalNetMeteringIsVisible(); }
//step_function: public void ThenIVarifyTotalNetMeteringPanelIsVisible() { propertyDetailsPage.varifyTotalNetMeteringIsVisible(); } //page_function: public void varifyTotalNetMeteringIsVisible() { Assert.isTrue(totalNetMetering.isVisible()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify that total net metering panel is visible ### response: //step_function: public void ThenIVarifyTotalNetMeteringPanelIsVisible() { ...
PropertyDetailSteps.java
I click on question mark on total net metering panel
public void IClickOnQuestionMarkOnTotalNetMeteringPanel() { propertyDetailsPage.clickOnToolTip(); }
public void clickOnToolTip() { clickOn(questionMark); }
@Then("I click on question mark on total net metering panel$") public void IClickOnQuestionMarkOnTotalNetMeteringPanel() { propertyDetailsPage.clickOnToolTip(); }
//step_function: public void IClickOnQuestionMarkOnTotalNetMeteringPanel() { propertyDetailsPage.clickOnToolTip(); } //page_function: public void clickOnToolTip() { clickOn(questionMark); }
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 question mark on total net metering panel ### response: //step_function: public void IClickOnQuestionMarkOnTotalNetMeteringPanel() { ...
PropertyDetailSteps.java
I verify tooltip text
public void ThenIVerifyTooltipTextIs() { String expectedTotalNetMeteringToolTipText=LoginStaticTextsEnum.TOTALNETMETERINGTOOLTIPTEXT.getValue(); String actualTotalNetMeteringToolTipText=propertyDetailsPage.getToolTipText(); Assert.assertTrue(expectedTotalNetMeteringToolTipText.equals(...
public String getToolTipText() { waitFor(toolTip); String ActualTotalNetMeteringToolTipText=toolTip.getText(); return ActualTotalNetMeteringToolTipText; }
@Then("I verify tooltip text$") public void ThenIVerifyTooltipTextIs() { String expectedTotalNetMeteringToolTipText=LoginStaticTextsEnum.TOTALNETMETERINGTOOLTIPTEXT.getValue(); String actualTotalNetMeteringToolTipText=propertyDetailsPage.getToolTipText(); Assert.assertTrue(expectedTot...
//step_function: public void ThenIVerifyTooltipTextIs() { String expectedTotalNetMeteringToolTipText=LoginStaticTextsEnum.TOTALNETMETERINGTOOLTIPTEXT.getValue(); String actualTotalNetMeteringToolTipText=propertyDetailsPage.getToolTipText(); Assert.assertTrue(expectedTotalNetMeteringTo...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify tooltip text ### response: //step_function: public void ThenIVerifyTooltipTextIs() { String expectedTotalNetMeteringToolTipText...
PropertyDetailSteps.java
After fetching data from data file)? I click on project (.*
public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickOnProjectName(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 click on project (.*)$") public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage....
//step_function: public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickOnProjectName(value); } //page_function: publ...
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 project (.* ### response: //step_function: public void userToEditInformationUser(String file,String valu...
PropertyDetailSteps.java
After fetching data from data file)? I verify (.*) in selected in dropdown and on property detail page is same
public void ThenAfterFetchingDataFromDataFileIVerifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); pro...
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 verify (.*) in selected in dropdown and on property detail page is same$") public void ThenAfterFetchingDataFromDataFileIVerifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String file,String value) throws FileNotFoundException, IOException { ...
//step_function: public void ThenAfterFetchingDataFromDataFileIVerifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(val...
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 verify (.*) in selected in dropdown and on property detail page is same ### response: //step_function: public void...
PropertyDetailSteps.java
After fetching data from data file)? I select (.*) from dropdown
public void ThenAfterFetchingDataFromDataFileISelectPropertyNameFromDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickOnSelectALocati...
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 select (.*) from dropdown$") public void ThenAfterFetchingDataFromDataFileISelectPropertyNameFromDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDat...
//step_function: public void ThenAfterFetchingDataFromDataFileISelectPropertyNameFromDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.cli...
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 select (.*) from dropdown ### response: //step_function: public void ThenAfterFetchingDataFromDataFileISelectPrope...
PropertyDetailSteps.java
After fetching data from data file)? I select (.*) select a location dropdown
public void ThenAfterFetchingDataFromDataFileISelectPropertyNameselectALocationDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickOnSe...
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 select (.*) select a location dropdown$") public void ThenAfterFetchingDataFromDataFileISelectPropertyNameselectALocationDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) v...
//step_function: public void ThenAfterFetchingDataFromDataFileISelectPropertyNameselectALocationDropdown(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDeta...
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 select (.*) select a location dropdown ### response: //step_function: public void ThenAfterFetchingDataFromDataFil...
PropertyDetailSteps.java
After fetching data from data file)? I verify (.*) breadcrumb near to property breadcrumb
public void GivenIVerifyProjectBreadcrumbNearToPropertyBreadcrumb(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.varifyBreadcrumbIsPresent(valu...
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 verify (.*) breadcrumb near to property breadcrumb$") public void GivenIVerifyProjectBreadcrumbNearToPropertyBreadcrumb(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=com...
//step_function: public void GivenIVerifyProjectBreadcrumbNearToPropertyBreadcrumb(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.varifyBreadcr...
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 verify (.*) breadcrumb near to property breadcrumb ### response: //step_function: public void GivenIVerifyProjectB...
PropertyDetailSteps.java
After fetching data from data file)? I click on property (.*
public void ThenIClickOnPropertyName(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickBreadcrumbLink(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; }
@Then("^(After fetching data from data file)? I click on property (.*)$") public void ThenIClickOnPropertyName(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); prope...
//step_function: public void ThenIClickOnPropertyName(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); propertyDetailsPage.clickBreadcrumbLink(value); } //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 click on property (.* ### response: //step_function: public void ThenIClickOnPropertyName(String file, String valu...
PropertyDetailSteps.java
I click on see details
public void GivenIClickOnSeeDetails() { propertyDetailsPage.clickOnSeeDetails(); }
public void clickOnSeeDetails() { JavascriptExecutor jse = (JavascriptExecutor)getDriver();; jse.executeScript("window.scrollBy(0,500)"); if(seeDetails.isVisible()) { clickOn(seeDetails); }
@Given("I click on see details$") public void GivenIClickOnSeeDetails() { propertyDetailsPage.clickOnSeeDetails(); }
//step_function: public void GivenIClickOnSeeDetails() { propertyDetailsPage.clickOnSeeDetails(); } //page_function: public void clickOnSeeDetails() { JavascriptExecutor jse = (JavascriptExecutor)getDriver();; jse.executeScript("window.scrollBy(0,500)"); if(seeDetails.isVisible()) { c...
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 see details ### response: //step_function: public void GivenIClickOnSeeDetails() { propertyDetailsPage.clickOnSeeDetails(); ...
PropertyDetailSteps.java
I click on dashboard
public void ThenIClickOnDashboard() { propertyDetailsPage.clickBreadcrumbLink("Dashboard"); } }
public void clickBreadcrumbLink(String BreadcrumbName) { String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); WebElement BreadcrumbEle=getDriver().findElement(By.xpath(project)); waitFor(BreadcrumbEle); clickOn(BreadcrumbEle); }
@Then("I click on dashboard") public void ThenIClickOnDashboard() { propertyDetailsPage.clickBreadcrumbLink("Dashboard"); } }
//step_function: public void ThenIClickOnDashboard() { propertyDetailsPage.clickBreadcrumbLink("Dashboard"); } } //page_function: public void clickBreadcrumbLink(String BreadcrumbName) { String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); WebElement Bread...
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 dashboard ### response: //step_function: public void ThenIClickOnDashboard() { propertyDetailsPage.clickBreadcrumbLink("Dashb...
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); }
@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); }
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=LoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); break; case "INVALID_EMAIL_ERROR": expectedError=LoginErrorMessagesEnum.INVALID_EMAIL_ERROR....
@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)); sign...
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=LoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); break; case "INVALID_EMAIL_ERROR": expectedError=LoginErrorMessagesEnum.INVALID_EMAIL_ERROR....
@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...
UserManagementSteps.java
I clicks on User Management tab
public void WhenIClicksOnUserManagementTab() { userManagementPage.clickOnUserManagementTab(); }
public void clickOnUserManagementTab() { userManagementTab.click(); }
@When("^I clicks on User Management tab$") public void WhenIClicksOnUserManagementTab() { userManagementPage.clickOnUserManagementTab(); }
//step_function: public void WhenIClicksOnUserManagementTab() { userManagementPage.clickOnUserManagementTab(); } //page_function: public void clickOnUserManagementTab() { userManagementTab.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 clicks on User Management tab ### response: //step_function: public void WhenIClicksOnUserManagementTab() { userManagementPage.clickOnUserMana...
UserManagementSteps.java
I click on user info
public void ThenIClickOnUserInfo() { userManagementPage.clickOnUser(); }
public void clickOnUser() { clickOn(user); }
@Then("I click on user info$") public void ThenIClickOnUserInfo() { userManagementPage.clickOnUser(); }
//step_function: public void ThenIClickOnUserInfo() { userManagementPage.clickOnUser(); } //page_function: public void clickOnUser() { clickOn(user); }
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 user info ### response: //step_function: public void ThenIClickOnUserInfo() { userManagementPage.clickOnUser(); } //page_functio...
UserManagementSteps.java
I click on edit user button on user info pop up
public void ThenIClickOnEditUserButtonOnUserInfoPopUp() { userManagementPage.clickOnEditUserInfo(); }
public void clickOnEditUserInfo() { clickOn(EditUserInfo); }
@Then("I click on edit user button on user info pop up$") public void ThenIClickOnEditUserButtonOnUserInfoPopUp() { userManagementPage.clickOnEditUserInfo(); }
//step_function: public void ThenIClickOnEditUserButtonOnUserInfoPopUp() { userManagementPage.clickOnEditUserInfo(); } //page_function: public void clickOnEditUserInfo() { clickOn(EditUserInfo); }
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 edit user button on user info pop up ### response: //step_function: public void ThenIClickOnEditUserButtonOnUserInfoPopUp() { userMan...
UserManagementSteps.java
After fetching data from data file)? I Validate user firstname (.*) and lastname (.*) is edited
public void ThenIValidateUserFirstnameUsereditedAndLastnameUsereditedIsEdited(String file,String firstname , String lname) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) firstname=commonPage.fetchDataFromDataProperties(firstname); userManagementPage.Valida...
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 Validate user firstname (.*) and lastname (.*) is edited$") public void ThenIValidateUserFirstnameUsereditedAndLastnameUsereditedIsEdited(String file,String firstname , String lname) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data...
//step_function: public void ThenIValidateUserFirstnameUsereditedAndLastnameUsereditedIsEdited(String file,String firstname , String lname) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) firstname=commonPage.fetchDataFromDataProperties(firstname); userMana...
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 Validate user firstname (.*) and lastname (.*) is edited ### response: //step_function: public void ThenIValidateU...
UserManagementSteps.java
After fetching data from data file)? I edit firstname and last name as (.*
public void ThenIEditFirstnameAndLastNameAsAutomationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterFirstName(value+generatedString); userManageme...
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 edit firstname and last name as (.*)$") public void ThenIEditFirstnameAndLastNameAsAutomationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(...
//step_function: public void ThenIEditFirstnameAndLastNameAsAutomationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterFirstName(value+generatedString); ...
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 firstname and last name as (.* ### response: //step_function: public void ThenIEditFirstnameAndLastNameAsAuto...
UserManagementSteps.java
I validate that name, role, last active, member since & mapped locations columns should be visible
public void ThenIValidateThatNameRoleLastActiveMemberSinceMappedLocationsColumnsShouldBeVisible() { userManagementPage.varifyGridColumnsArePresent(); }
public void varifyGridColumnsArePresent() { Assert.assertTrue(name.isDisplayed()); Assert.assertTrue(role.isDisplayed()); Assert.assertTrue(lastActive.isDisplayed()); Assert.assertTrue(memberSince.isDisplayed()); Assert.assertTrue(mappedLocations.isDisplayed()); Assert.assertTrue(totalMapped.isDisplayed());...
@Then("I validate that name, role, last active, member since & mapped locations columns should be visible$") public void ThenIValidateThatNameRoleLastActiveMemberSinceMappedLocationsColumnsShouldBeVisible() { userManagementPage.varifyGridColumnsArePresent(); }
//step_function: public void ThenIValidateThatNameRoleLastActiveMemberSinceMappedLocationsColumnsShouldBeVisible() { userManagementPage.varifyGridColumnsArePresent(); } //page_function: public void varifyGridColumnsArePresent() { Assert.assertTrue(name.isDisplayed()); Assert.assertTrue(role.isDisplaye...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I validate that name, role, last active, member since & mapped locations columns should be visible ### response: //step_function: public void ThenIValida...
UserManagementSteps.java
I verify that logged in user is at top with mentioned and does not have delete and edit icon
public void WhenIVerifyThatLoggedInUserIsAtTopWithMentionedAndDoesNotHaveDeleteAndEditIcon() { userManagementPage.varifyLoggedInUserShouldOnTOpOfGrid(); }
public void varifyLoggedInUserShouldOnTOpOfGrid() { String user=loggedInUser.getText(); Assert.assertTrue(user.contains("You")); }
@When("I verify that logged in user is at top with mentioned and does not have delete and edit icon$") public void WhenIVerifyThatLoggedInUserIsAtTopWithMentionedAndDoesNotHaveDeleteAndEditIcon() { userManagementPage.varifyLoggedInUserShouldOnTOpOfGrid(); }
//step_function: public void WhenIVerifyThatLoggedInUserIsAtTopWithMentionedAndDoesNotHaveDeleteAndEditIcon() { userManagementPage.varifyLoggedInUserShouldOnTOpOfGrid(); } //page_function: public void varifyLoggedInUserShouldOnTOpOfGrid() { String user=loggedInUser.getText(); Assert.assertTrue(user.co...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify that logged in user is at top with mentioned and does not have delete and edit icon ### response: //step_function: public void WhenIVerifyThatLo...
UserManagementSteps.java
After fetching data from data file)? I searched for (.*) user
public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterValueInSearchbox(value+generatedString); }
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 searched for (.*) user$") public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterValue...
//step_function: public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterValueInSearchbox(value+generatedString); } //page_function: ...
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 searched for (.*) user ### response: //step_function: public void userToEditInformationUser(String file,String va...
UserManagementSteps.java
After fetching data from data file)? I click on edit button to edit user (.*
public void ThenIClickOnEditButtonToEditUser(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.editUser(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; }
@Then("^(After fetching data from data file)? I click on edit button to edit user (.*)$") public void ThenIClickOnEditButtonToEditUser(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); ...
//step_function: public void ThenIClickOnEditButtonToEditUser(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.editUser(value); } //page_function: public Str...
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 edit button to edit user (.* ### response: //step_function: public void ThenIClickOnEditButtonToEditUser(...
UserManagementSteps.java
After fetching data from data file)? I click on delete button icon to delete user (.*
public void ThenIClickOnDeleteButtonIconToDeleteUser(String file, String value) throws InterruptedException, FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.deleteUser(value+generatedString); ...
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 click on delete button icon to delete user (.*)$") public void ThenIClickOnDeleteButtonIconToDeleteUser(String file, String value) throws InterruptedException, FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage...
//step_function: public void ThenIClickOnDeleteButtonIconToDeleteUser(String file, String value) throws InterruptedException, FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.deleteUser(value+gene...
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 delete button icon to delete user (.* ### response: //step_function: public void ThenIClickOnDeleteButton...
UserManagementSteps.java
I verify that heading will be Edit User
public void ThenIVerifyThatHeadingWillBeEditUser() { userManagementPage.varifyEditUserHeading(); } public int getRandomNumberUsingNextInt( ) { Random random = new Random(); return random.nextInt(9999 - 1001) + 1001; }
public void varifyEditUserHeading() { Assert.assertTrue(editUserHeading.isVisible()); }
@Then("I verify that heading will be Edit User$") public void ThenIVerifyThatHeadingWillBeEditUser() { userManagementPage.varifyEditUserHeading(); } public int getRandomNumberUsingNextInt( ) { Random random = new Random(); return random.nextInt(9999 - 1001) + 1001; }
//step_function: public void ThenIVerifyThatHeadingWillBeEditUser() { userManagementPage.varifyEditUserHeading(); } public int getRandomNumberUsingNextInt( ) { Random random = new Random(); return random.nextInt(9999 - 1001) + 1001; } //page_function: public void varifyEditUse...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify that heading will be Edit User ### response: //step_function: public void ThenIVerifyThatHeadingWillBeEditUser() { userManagementPage.v...
UserManagementSteps.java
After fetching data from data file)? I enter first name (.*), last name, phone number, email id and role in edit user popup
public void ThenIEnterFirstNameLastNamePhoneNumberEmailIdAndRoleInEditUserPopup(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterFirstName(value+generated...
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 enter first name (.*), last name, phone number, email id and role in edit user popup") public void ThenIEnterFirstNameLastNamePhoneNumberEmailIdAndRoleInEditUserPopup(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.co...
//step_function: public void ThenIEnterFirstNameLastNamePhoneNumberEmailIdAndRoleInEditUserPopup(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.enterFirstNam...
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 first name (.*), last name, phone number, email id and role in edit user popup ### response: //step_function...
UserManagementSteps.java
I click on submit button on edit user screen
public void ThenIClickOnSubmitButtonOnEditUserScreen() throws InterruptedException { userManagementPage.clickOnSubmitEditUser(); Thread.sleep(5000); }
public void clickOnSubmitEditUser(){ SubmitButton.click(); }
@Then("I click on submit button on edit user screen$") public void ThenIClickOnSubmitButtonOnEditUserScreen() throws InterruptedException { userManagementPage.clickOnSubmitEditUser(); Thread.sleep(5000); }
//step_function: public void ThenIClickOnSubmitButtonOnEditUserScreen() throws InterruptedException { userManagementPage.clickOnSubmitEditUser(); Thread.sleep(5000); } //page_function: public void clickOnSubmitEditUser(){ SubmitButton.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 on submit button on edit user screen ### response: //step_function: public void ThenIClickOnSubmitButtonOnEditUserScreen() throws InterruptedExce...
UserManagementSteps.java
I validate Success message should visible
public void ThenIValidateSuccessMessageShouldVisible() { userManagementPage.validateSuccessPopupAndMessage(); }
public void validateSuccessPopupAndMessage() { Assert.assertTrue(success.isDisplayed()); Assert.assertTrue(successMessage.isDisplayed()); }
@Then("I validate Success message should visible$") public void ThenIValidateSuccessMessageShouldVisible() { userManagementPage.validateSuccessPopupAndMessage(); }
//step_function: public void ThenIValidateSuccessMessageShouldVisible() { userManagementPage.validateSuccessPopupAndMessage(); } //page_function: public void validateSuccessPopupAndMessage() { Assert.assertTrue(success.isDisplayed()); Assert.assertTrue(successMessage.isDisplayed()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I validate Success message should visible ### response: //step_function: public void ThenIValidateSuccessMessageShouldVisible() { userManagement...
UserManagementSteps.java
I click on Continue button on success message
public void ThenIClickOnContinueButtonOnSuccessMessage() { userManagementPage.clickOnContinueButton(); }
public void clickOnContinueButton() { WebDriverWait wait=new WebDriverWait(getDriver(),30); wait.until(ExpectedConditions.elementToBeClickable(continueButton)); continueButton.click(); }
@Then("I click on Continue button on success message$") public void ThenIClickOnContinueButtonOnSuccessMessage() { userManagementPage.clickOnContinueButton(); }
//step_function: public void ThenIClickOnContinueButtonOnSuccessMessage() { userManagementPage.clickOnContinueButton(); } //page_function: public void clickOnContinueButton() { WebDriverWait wait=new WebDriverWait(getDriver(),30); wait.until(ExpectedConditions.elementToBeClickable(continueButton)); ...
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 on success message ### response: //step_function: public void ThenIClickOnContinueButtonOnSuccessMessage() { userMana...
UserManagementSteps.java
I click on add new user button to create user
public void ThenIClickOnAddNewUserButtonToCreateUser() { userManagementPage.clickOnAddNewUser(); }
public void clickOnAddNewUser() { addNewUser.click(); }
@Then("I click on add new user button to create user$") public void ThenIClickOnAddNewUserButtonToCreateUser() { userManagementPage.clickOnAddNewUser(); }
//step_function: public void ThenIClickOnAddNewUserButtonToCreateUser() { userManagementPage.clickOnAddNewUser(); } //page_function: public void clickOnAddNewUser() { addNewUser.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 on add new user button to create user ### response: //step_function: public void ThenIClickOnAddNewUserButtonToCreateUser() { userManage...
UserManagementSteps.java
I select the role user
public void ThenISelecTheRoleUser() { userManagementPage.selectRole(); }
public void selectRole(int num) throws InterruptedException { String role=String.format(parameterizedRole, num); WebElement elem=getDriver().findElement(By.xpath(role)); WebDriverWait wait=new WebDriverWait(getDriver(),15); wait.until(ExpectedConditions.elementToBeClickable(elem)); Thread.sleep(2000); click...
@Then("I select the role user$") public void ThenISelecTheRoleUser() { userManagementPage.selectRole(); }
//step_function: public void ThenISelecTheRoleUser() { userManagementPage.selectRole(); } //page_function: public void selectRole(int num) throws InterruptedException { String role=String.format(parameterizedRole, num); WebElement elem=getDriver().findElement(By.xpath(role)); WebDriverWait wait=new ...
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 the role user ### response: //step_function: public void ThenISelecTheRoleUser() { userManagementPage.selectRole(); } //page_funct...
UserManagementSteps.java
I select the role (.*
public void ThenISelecTheRole(int num) throws InterruptedException { userManagementPage.selectRole(num); }
public void selectRole(int num) throws InterruptedException { String role=String.format(parameterizedRole, num); WebElement elem=getDriver().findElement(By.xpath(role)); WebDriverWait wait=new WebDriverWait(getDriver(),15); wait.until(ExpectedConditions.elementToBeClickable(elem)); Thread.sleep(2000); click...
@Then("I select the role (.*)$") public void ThenISelecTheRole(int num) throws InterruptedException { userManagementPage.selectRole(num); }
//step_function: public void ThenISelecTheRole(int num) throws InterruptedException { userManagementPage.selectRole(num); } //page_function: public void selectRole(int num) throws InterruptedException { String role=String.format(parameterizedRole, num); WebElement elem=getDriver().findElement(By.xpath...
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 the role (.* ### response: //step_function: public void ThenISelecTheRole(int num) throws InterruptedException { userManagementPage.sel...
UserManagementSteps.java
After fetching data from data file)? I verify (.*) user is created or edited
public void ThenIVerifyUserIsCreated(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.varifyUserCreatedOrEdited(value+generatedString); }
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 verify (.*) user is created or edited$") public void ThenIVerifyUserIsCreated(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userMana...
//step_function: public void ThenIVerifyUserIsCreated(String file, String value) throws FileNotFoundException, IOException { if((file!=null)&&(file.contains("data file"))) value=commonPage.fetchDataFromDataProperties(value); userManagementPage.varifyUserCreatedOrEdited(value+generatedString); } //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 verify (.*) user is created or edited ### response: //step_function: public void ThenIVerifyUserIsCreated(String f...
UserManagementSteps.java
I verify (.*) user is edited
public void ThenIVerifyUserIsEdited(String user) { userManagementPage.varifyUserCreatedOrEdited(user+generatedString); }
public void varifyUserCreatedOrEdited(String user) { String buttonXpath=String.format(parameterizedUserName, user); WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); WebDriverWait wait=new WebDriverWait(getDriver(),15); wait.until(ExpectedConditions.elementToBeClickable(elem)); Assert.assertTrue...
@Then("I verify (.*) user is edited$") public void ThenIVerifyUserIsEdited(String user) { userManagementPage.varifyUserCreatedOrEdited(user+generatedString); }
//step_function: public void ThenIVerifyUserIsEdited(String user) { userManagementPage.varifyUserCreatedOrEdited(user+generatedString); } //page_function: public void varifyUserCreatedOrEdited(String user) { String buttonXpath=String.format(parameterizedUserName, user); WebElement elem=getDriver().fin...
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify (.*) user is edited ### response: //step_function: public void ThenIVerifyUserIsEdited(String user) { userManagementPage.varifyUserCrea...
UserManagementSteps.java
I verify groups pop up should open
public void IVerifyGroupsPopUpShouldOpen() { userManagementPage.varifyGroupsPopupOpened(); }
public void varifyGroupsPopupOpened() { Assert.assertTrue(groupsHeader.isVisible()); }
@Then("I verify groups pop up should open$") public void IVerifyGroupsPopUpShouldOpen() { userManagementPage.varifyGroupsPopupOpened(); }
//step_function: public void IVerifyGroupsPopUpShouldOpen() { userManagementPage.varifyGroupsPopupOpened(); } //page_function: public void varifyGroupsPopupOpened() { Assert.assertTrue(groupsHeader.isVisible()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify groups pop up should open ### response: //step_function: public void IVerifyGroupsPopUpShouldOpen() { userManagementPage.varifyGroupsPo...
UserManagementSteps.java
I verify delete group pop up should open
public void IVerifyDeleteGroupPopUpShouldOpen() { userManagementPage.varifyDeleteGroupPopupOpened(); }
public void varifyDeleteGroupPopupOpened() { Assert.assertTrue(deleteGroupPopup.isVisible()); }
@Then("I verify delete group pop up should open$") public void IVerifyDeleteGroupPopUpShouldOpen() { userManagementPage.varifyDeleteGroupPopupOpened(); }
//step_function: public void IVerifyDeleteGroupPopUpShouldOpen() { userManagementPage.varifyDeleteGroupPopupOpened(); } //page_function: public void varifyDeleteGroupPopupOpened() { Assert.assertTrue(deleteGroupPopup.isVisible()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify delete group pop up should open ### response: //step_function: public void IVerifyDeleteGroupPopUpShouldOpen() { userManagementPage.var...
UserManagementSteps.java
I click on Delete Group button on delete group pop up
public void ThenIClickOnDeleteGroupButtonOnDeleteGroupPopUp() { userManagementPage.clickDeleteGroupOnPopup(); }
public void clickDeleteGroupOnPopup(){ clickOn(deleteGroupPopupButton); }
@Then("I click on Delete Group button on delete group pop up$") public void ThenIClickOnDeleteGroupButtonOnDeleteGroupPopUp() { userManagementPage.clickDeleteGroupOnPopup(); }
//step_function: public void ThenIClickOnDeleteGroupButtonOnDeleteGroupPopUp() { userManagementPage.clickDeleteGroupOnPopup(); } //page_function: public void clickDeleteGroupOnPopup(){ clickOn(deleteGroupPopupButton); }
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 Delete Group button on delete group pop up ### response: //step_function: public void ThenIClickOnDeleteGroupButtonOnDeleteGroupPopUp() { ...
UserManagementSteps.java
I verify create group pop up should open
public void ThenIVerifyCreateGroupPopUpShouldOpen() { userManagementPage.varifyCreateGroupPopupOpened(); }
public void varifyCreateGroupPopupOpened() { Assert.assertTrue(createGroupHeader.isVisible()); }
@Then("I verify create group pop up should open$") public void ThenIVerifyCreateGroupPopUpShouldOpen() { userManagementPage.varifyCreateGroupPopupOpened(); }
//step_function: public void ThenIVerifyCreateGroupPopUpShouldOpen() { userManagementPage.varifyCreateGroupPopupOpened(); } //page_function: public void varifyCreateGroupPopupOpened() { Assert.assertTrue(createGroupHeader.isVisible()); }
As a Quality Assurance Manager, write step definition and page definition code using Java with Cucumber framework for the below given instruction. ### instruction: I verify create group pop up should open ### response: //step_function: public void ThenIVerifyCreateGroupPopUpShouldOpen() { userManagementPage...