|
text |
|
" |
|
|
|
|
|
|
|
|
|
I enter the correct OTP in Login screen( but the old one| but the expired one)? |
|
|
|
|
|
public void enterOtp(String correctOtp) { |
|
waitFor(otpTextFields); |
|
otpTextFields.clear(); |
|
otpTextFields.clear(); |
|
otpTextFields.clear(); |
|
otpTextFields.clear(); |
|
otpTextFields.clear(); |
|
otpTextFields.clear(); |
|
waitABit(200); |
|
typeInto(otpTextFields,correctOtp); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
Product list is displayed |
|
|
|
|
|
public void productListIsDisplayed() { |
|
Assert.assertTrue(productListPage.searchResultPageIsDisplayed()); |
|
|
|
String actualResultTitle = productListPage.getResultTitle().toLowerCase(); |
|
String expectedProductName = testContext.scenarioContext.getContext(Context.EXPECTED_DATA).toString().toLowerCase(); |
|
|
|
Assert.assertEquals(expectedProductName, actualResultTitle); |
|
|
|
int totalProduct = Integer.parseInt(productListPage.getProductAmount()); |
|
|
|
for (int i = 0; i < totalProduct; i++) { |
|
String actualProductTitle = productListPage.getAllProductTitle(i).toLowerCase(); |
|
|
|
Assert.assertTrue(testContext.scenarioContext.isContains(Context.EXPECTED_DATA)); //Context assertion |
|
Assert.assertTrue(actualProductTitle.contains(expectedProductName)); //Common assertion |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I should be successful in creating a new account (.* |
|
|
|
|
|
public void isSuccessfullySignedUp(String userName){ |
|
assert dashboardPage.isUserLoggedByName(userName); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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.validateMaskingInEmail(value); |
|
else if(emailOrMobile.equalsIgnoreCase(""mobile number"")) |
|
loginSecondScreenPage.validateMaskingInMobile(value); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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.fetchErrorMessageConstantsfromEnum(expectedError); |
|
signUpSecondScreenPage.validateErrorMessage(expectedError); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
} |
|
|
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I add it again |
|
|
|
|
|
public void addToCart(String productName) { |
|
String raw = ""a[aria-label='Add “"" + productName + ""” to your cart']""; |
|
byte[] bytes = raw.getBytes(StandardCharsets.UTF_8); |
|
String utf8Encoded = new String(bytes, StandardCharsets.UTF_8); |
|
By addToCartBtn = By.cssSelector(utf8Encoded); |
|
waitForElementVisibility(titleTxt); |
|
click(addToCartBtn); |
|
click(viewCartLink); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I provide the Utility Details |
|
|
|
|
|
public void provideUtilityDetails() { |
|
waitABit(5000); |
|
clickOn(signinButton); |
|
getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='MuiDialogContent-root']//iframe""))); |
|
waitABit(5000); |
|
// typeInto(customerEmailTextfield,""[email protected]""); |
|
typeInto(uesrNameTextfield,""UAPI_TEST_residential""); |
|
typeInto(passwordTextfield,""TEST""); |
|
typeInto(digitalSignatureTextfield,""Siddharth""); |
|
waitABit(5000); |
|
waitFor(authorizeButton); |
|
clickOn(authorizeButton); |
|
waitABit(35000); |
|
getDriver().switchTo().defaultContent(); |
|
waitFor(iDontQualifyButton); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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""); |
|
if(fuelDetails.containsKey(""fuelOilConsumption"") && fuelDetails.containsKey(""naturalGasConsumption"")) { |
|
Assert.assertTrue(fuelType.contains(""Fuel Oil"") && fuelType.contains(""Natural Gas"")); |
|
}else if(fuelDetails.containsKey(""fuelOilConsumption"")) { |
|
Assert.assertTrue(fuelType.contains(""Fuel Oil"")); |
|
}else if(fuelDetails.containsKey(""naturalGasConsumption"")) { |
|
Assert.assertTrue(fuelType.contains(""Natural Gas"")); |
|
}else { |
|
Assert.assertTrue(fuelType.contains(""--"")); |
|
} |
|
|
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I choose to Resend OTP in Signup |
|
|
|
|
|
public void resendOtp() { |
|
clickOn(resendButton); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I assign (.*) Project |
|
|
|
|
|
public void Project(String projectName) |
|
{ |
|
adminLoginPage.assignProject(projectName); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
Login form in login page |
|
|
|
|
|
public boolean defaultHomePageIsDisplayed() { |
|
headerLogoButton.isDisplayed(); |
|
searchInput.isDisplayed(); |
|
cartButton.isDisplayed(); |
|
bhinnekaCopyrightFooter.isDisplayed(); |
|
return true; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I get error message (.*) for select user role |
|
|
|
|
|
public String fetchUserManagementErrorMessageConstantsfromEnum(String expectedError) throws Exception { |
|
switch(expectedError) { |
|
case ""INVALID_FIRSTNAME_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.INVALID_FIRSTNAME_ERROR.getValue(); |
|
break; |
|
case ""INVALID_LASSTNAME_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.INVALID_LASSTNAME_ERROR.getValue(); |
|
break; |
|
case ""FIRSTNAME_NUMBER_SPECIAL_CHAR_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.FIRSTNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue(); |
|
break; |
|
case ""LASTNAME_NUMBER_SPECIAL_CHAR_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.LASTNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue(); |
|
break; |
|
case ""INVALID_MOBILE_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); |
|
break; |
|
case ""MOBILE_START_ZERO_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.MOBILE_START_ZERO_ERROR.getValue(); |
|
break; |
|
case ""INVALID_EMAIL_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); |
|
break; |
|
case ""EMAIL_MAX_50_CHARS"": |
|
expectedError=UserManagementErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); |
|
break; |
|
case ""SELECT_ROLE_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.SELECT_ROLE_ERROR.getValue(); |
|
break; |
|
case ""SELECT_MAPPED_LOCATIONS_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.SELECT_MAPPED_LOCATIONS_ERROR.getValue(); |
|
break; |
|
case ""FIRSTNAME_MAX_30_CHARS"": |
|
expectedError=UserManagementErrorMessagesEnum.FIRSTNAME_MAX_30_CHARS.getValue(); |
|
break; |
|
case ""LASTNAME_MAX_25_CHARS"": |
|
expectedError=UserManagementErrorMessagesEnum.LASTNAME_MAX_25_CHARS.getValue(); |
|
break; |
|
case ""INVALID_GROUPNAME_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.INVALID_GROUPNAME_ERROR.getValue(); |
|
break; |
|
case ""GROUPNAME_NUMBER_SPECIAL_CHAR_ERROR"": |
|
expectedError=UserManagementErrorMessagesEnum.GROUPNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue(); |
|
break; |
|
case ""GROUPNAME_MAX_30_CHARS"": |
|
expectedError=UserManagementErrorMessagesEnum.GROUPNAME_MAX_30_CHARS.getValue(); |
|
break; |
|
default: |
|
throw new Exception(""This Expected Error in feature file is not present in the list of expected errors in switch case or Enum file""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I set request specification with the (.*) API with headers and payload |
|
|
|
|
|
public void add_API_Payload(String file, String apiURL) throws IOException { |
|
|
|
if((file!=null) && (file.contains(""data file""))) { |
|
apiURL=apiURL+""APIURL""; |
|
apiURL=commonPage.fetchDataFromDataProperties(apiURL); |
|
} |
|
|
|
// int index=apiURL.indexOf(""1006""); |
|
// if(index>=0) |
|
// apiURL=apiURL.replace(""1006"",customerId); |
|
|
|
RestAssured.baseURI=apiURL; |
|
RestAssured.useRelaxedHTTPSValidation(); |
|
httpRequest = RestAssured.given().headers(headersMap).body(payload.getBytes()); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on dashboard |
|
|
|
|
|
public void ThenIClickOnDashboard() |
|
{ |
|
propertyDetailsPage.clickBreadcrumbLink(""Dashboard""); |
|
} |
|
|
|
|
|
|
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I should successfully land to dashboard |
|
|
|
|
|
public void landDashboard(){ |
|
dashboardPage.landDashboard(); |
|
} |
|
|
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on Submit button on edit group pop up |
|
|
|
|
|
public void clickOnSubmitEditGroupButton() { |
|
clickOn(submitEditGroup); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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(response,key).substring(1, (l-1)); |
|
long sumOfAll=0; |
|
int sumOfAllMinus=0; |
|
int sumOfAllPlus=0; |
|
int responseSize=0; |
|
responseSize=response.body().jsonPath().getList(""cityPerformanceDataTOs"").size(); |
|
String[] arr = null; |
|
arr=value.split("",""); |
|
for(int i=0;i<responseSize;i++){ |
|
System.out.println(""The amount value fetched is ""+arr[i]); |
|
assertFalse(arr[i].startsWith(""-"")); |
|
if(arr[i].endsWith(""K"")) |
|
sumOfAll=sumOfAll+(Long.parseLong(arr[i].substring(0,arr[i].length()-1).trim()))*1000; |
|
else if(arr[i].endsWith(""M"")) |
|
sumOfAll=sumOfAll+(Long.parseLong(arr[i].substring(0,arr[i].length()-1).trim()))*1000000; |
|
else |
|
sumOfAll=sumOfAll+Long.parseLong(arr[i].trim()); |
|
} |
|
System.out.println(""The total amount is ""+sumOfAll); |
|
String total=getJsonPath(response,totalRidesSaved); |
|
String resultFlag; |
|
if(sumOfAll>1000000){ |
|
sumOfAll=sumOfAll/1000000; |
|
resultFlag=""M""; |
|
assertTrue(total.endsWith(resultFlag)); |
|
total=total.substring(0, total.length()-1); |
|
sumOfAllMinus=(int)sumOfAll-1; |
|
sumOfAllPlus=(int)sumOfAll+1; |
|
assertTrue((valueOf(sumOfAll).equals(total))||(valueOf(sumOfAllPlus).equals(total))||(valueOf(sumOfAllMinus).equals(total))); |
|
}else if(sumOfAll>10000){ |
|
sumOfAll=sumOfAll/1000; |
|
resultFlag=""K""; |
|
sumOfAllMinus=(int)sumOfAll-1; |
|
sumOfAllPlus=(int)sumOfAll+1; |
|
assertTrue(total.endsWith(resultFlag)); |
|
total=total.substring(0, total.length()-1); |
|
assertTrue((valueOf(sumOfAll).equals(total))||(valueOf(sumOfAllPlus).equals(total))||(valueOf(sumOfAllMinus).equals(total))); |
|
}else { |
|
assertEquals(valueOf(sumOfAll),total); |
|
} |
|
System.out.println(""Rides saved matched""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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{ |
|
helpAndSupportPage.verifyFieldsPrepopulated(field, value); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on pencil icon to edit group |
|
|
|
|
|
public void clickOnPencilIconToEditGroup() { |
|
clickOn(editGroup); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
Go to cart page without authorizations |
|
|
|
|
|
public void goToCartPageWithoutAuthorizations() { |
|
homePage.clickCartButton(); |
|
Assert.assertTrue(loginPage.emailLoginPageIsDisplayed()); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on continue button in Signup Screen-2 |
|
|
|
|
|
public void ClickOnContinue() { |
|
signUpSecondScreenPage.clickOnContinue(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on Cancel button to close groups popup |
|
|
|
|
|
public void ThenIClickOnCancelButtonToCloseGroupsPopup() |
|
{ |
|
userManagementPage.clickCancelGroupspopup(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen |
|
|
|
|
|
public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception { |
|
switch(expectedStaticText) { |
|
case ""LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN1_STATIC_TEXT_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.getValue(); |
|
break; |
|
case ""ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_UTILITY_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_UTILITY_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_LMI_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_LMI_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
default: |
|
throw new Exception(""This Expected Static Text in feature file is not present in the list of expected static texts in switch case or Enum file""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file)? I enter all mandatory fields first name (.*), last name, phone number, email id, role and mapped location (.*) from the list |
|
|
|
|
|
public void GivenAfterFetchingDataFromDataFileIEnterAllMandatoryFieldsFirstNameLastNamePhoneNumberEmailIdRoleAndMappedLocationNikeFromTheList(String file, String value, String location) throws FileNotFoundException, IOException |
|
{ |
|
if((file!=null)&&(file.contains(""data file""))) { |
|
value=commonPage.fetchDataFromDataProperties(value); |
|
location=commonPage.fetchDataFromDataProperties(location); |
|
} |
|
|
|
userManagementPage.enterFirstName(value+generatedString); |
|
userManagementPage.enterLastName(value+generatedString); |
|
userManagementPage.enterEmail(value+generatedString+""" |
|
" |
|
|
|
|
|
|
|
|
|
I verify (.*) user is edited |
|
|
|
|
|
public void ThenIVerifyUserIsEdited(String user) |
|
{ |
|
userManagementPage.varifyUserCreatedOrEdited(user+generatedString); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
Select product in {int} list |
|
|
|
|
|
public boolean searchResultPageIsDisplayed() { |
|
Wait.untilPageReadyState(webDriver, 5L); |
|
resultTitle.isDisplayed(); |
|
urutkanOptionButton.isDisplayed(); |
|
listViewButton.isDisplayed(); |
|
gridViewButton.isDisplayed(); |
|
return true; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I provide the Utility Details |
|
|
|
|
|
public void provide_UtilityDetails() { |
|
utilityScreenPage.provideUtilityDetails(); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
} |
|
|
|
clientid=commonPage.fetchDataFromDataProperties(""clientId""); |
|
int businessEntityId, cId; |
|
String landlordProjectIds, locationId, locationId1, locationId2, locationId3, groupName, bcAssetId, projectIds1, projectIds2, projectIds, bcAssetId1, bcAssetId2; |
|
|
|
switch(apiName) { |
|
case ""session"": |
|
payload=sessionAPIParameterizedPayload1+clientid+(String.format(sessionAPIParameterizedPayload2, email)); |
|
break; |
|
case ""authkey"": |
|
String payload1=String.format(authkeyAPIParameterizedPayload, email); |
|
String otpCode=CommonSteps.otp.toString(); |
|
String payload2=""\""},\""ClientId\"":\""""; |
|
String payload3=""\"",\""Session\"":\""""; |
|
String payload4=""\""}""; |
|
payload=payload1+otpCode+payload2+clientid+payload3+session+payload4; |
|
break; |
|
case ""consent"": |
|
payload=String.format(consentAPIParameterizedPayload, email); |
|
break; |
|
case ""landLease"": |
|
String projectId="""", vendorId=""""; |
|
if((file!=null) && (file.contains(""data file""))) { |
|
projectId=commonPage.fetchDataFromDataProperties(""projectIdForIncomeAPI""); |
|
// vendorId=commonPage.fetchDataFromDataProperties(""vendorIdForIncomeAPI""); |
|
} |
|
// String payload5=String.format(incomeAPIParameterizedPayload1, projectId); |
|
// String payload6=String.format(incomeAPIParameterizedPayload2, vendorId); |
|
// payload=payload5+payload6; |
|
// landlordProjectIds=commonPage.fetchDataFromDataProperties(""landlordProjectIds""); |
|
businessEntityId=Integer.parseInt(commonPage.fetchDataFromDataProperties(""businessEntityId2"")); |
|
cId=Integer.parseInt(commonPage.fetchDataFromDataProperties(""customerId2"")); |
|
payload=Payload.projectsForLandlord(businessEntityId, cId, projectId); |
|
break; |
|
case ""helpAndSupportEmail"": |
|
payload=String.format(helpAndSupportEmailParameterizedPayload, email); |
|
break; |
|
case ""createNewUser"": |
|
String firstName=commonPage.fetchDataFromDataProperties(""userFirstName""); |
|
String lastName=commonPage.fetchDataFromDataProperties(""userLastName""); |
|
String userEmail=""automationemail""+(commonPage.generatedString)+""" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on Submit button on Login screen |
|
|
|
|
|
public void submitLogin() { |
|
otpTextFields.submit(); |
|
waitABit(10000); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on Delete Group button on delete group pop up |
|
|
|
|
|
public void clickDeleteGroupOnPopup(){ |
|
clickOn(deleteGroupPopupButton); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on Continue button on success message |
|
|
|
|
|
public void ThenIClickOnContinueButtonOnSuccessMessage() |
|
{ |
|
userManagementPage.clickOnContinueButton(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
Input data with {string} in search bar |
|
|
|
|
|
public void setSearchInput(String product) { |
|
searchInput.isEnabled(); |
|
searchInput.click(); |
|
searchInput.sendKeys(product); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I should get a masking on (email|mobile number) (.* |
|
|
|
|
|
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; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I verify property name (.*) in selected in dropdown and on property detail page is same |
|
|
|
|
|
public void varifyPropertysSelectedOnDropdownAndPageAreSame(String propertyName) { |
|
String SelectedPropertyfromDropdown=String.format(parameterizedSelectedPropertyfromDropdown, propertyName); |
|
String PropertyNameOnPage=String.format(parameterizedPropertyNameOnPage, propertyName); |
|
WebElement SelectedPropertyfromDropdownEle=getDriver().findElement(By.xpath(SelectedPropertyfromDropdown)); |
|
WebElement PropertyNameOnPageEle=getDriver().findElement(By.xpath(PropertyNameOnPage)); |
|
Assert.isTrue((SelectedPropertyfromDropdownEle.getText()).equals(PropertyNameOnPageEle.getText())); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I edit Address in Customer Profile |
|
|
|
|
|
public void enterSecondScreenDetails(String file,DataTable dataTable) { |
|
List<List<String>> data = dataTable.raw(); |
|
adminLoginPage.enterCity(data.get(0).get(0)); |
|
adminLoginPage.enterAddress1(data.get(0).get(1)); |
|
adminLoginPage.enterAddress2(data.get(0).get(2)); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I validate that Email is successfully sent |
|
|
|
|
|
public void validateEmailSentSuccessfully() { |
|
waitFor(emailSentSuccessfullyMessage); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I choose to Go Back |
|
|
|
|
|
public void goBack() { |
|
loginSecondScreenPage.goBack(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I enter (card|US bank account) details for utility savings |
|
|
|
|
|
public void enterCardDetails(String cardNumberValue, String expiryValue, String cvcValue, String dobValue) { |
|
getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='__PrivateStripeElement']//iframe[1]""))); |
|
waitFor(cardNumberTextField); |
|
typeInto(cardNumberTextField, cardNumberValue); |
|
typeInto(expiryTextField, expiryValue); |
|
typeInto(cvcTextField, cvcValue); |
|
getDriver().switchTo().defaultContent(); |
|
typeInto(dobTextField, dobValue); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on (.*) page |
|
|
|
|
|
public void change_page(String page) { |
|
billingPage.changePage(page); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on (.*) tab |
|
|
|
|
|
public void clickTab(String tabText) { |
|
commonPage.clickTab(tabText); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I change to (.*) filter |
|
|
|
|
|
public void change_filter(String filter) { |
|
billingPage.changeFilter(filter); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I see static text (.*) in Login screen |
|
|
|
|
|
public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception { |
|
switch(expectedStaticText) { |
|
case ""LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN1_STATIC_TEXT_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue(); |
|
break; |
|
case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"": |
|
expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.getValue(); |
|
break; |
|
case ""ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
case ""ONBOARDING_UTILITY_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_UTILITY_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_LMI_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_LMI_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT.getValue(); |
|
break; |
|
case ""ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR"": |
|
expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR.getValue(); |
|
break; |
|
default: |
|
throw new Exception(""This Expected Static Text in feature file is not present in the list of expected static texts in switch case or Enum file""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I should see {int} {product} in the cart |
|
|
|
|
|
public String getProductName() { |
|
return getElementText(productNameFld); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I successfully download the Bill |
|
|
|
|
|
public void downloadBill() { |
|
billingPage.downloadBill(); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I get error message (.*) for firstname |
|
|
|
|
|
public void ThenIGetErrorMessageForFirstname(String expectedError) throws Exception |
|
{ |
|
expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); |
|
userManagementPage.validateErrorMessage(""First Name"", expectedError); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file)? I enter first name (.*), last name, phone number, email id |
|
|
|
|
|
public void ThenIEnterFirstNameLastNamePhoneNumberEmailId(String file, String value) throws FileNotFoundException, IOException |
|
{ |
|
if((file!=null)&&(file.contains(""data file""))) |
|
value=commonPage.fetchDataFromDataProperties(value); |
|
Random objGenerator = new Random(); |
|
int randomNumber = objGenerator.nextInt(99); |
|
|
|
userManagementPage.enterFirstName(value+generatedString); |
|
userManagementPage.enterLastName(value+generatedString); |
|
userManagementPage.enterEmail(value+generatedString+""" |
|
" |
|
|
|
|
|
|
|
|
|
I click on (.*) button |
|
|
|
|
|
public void clickButton(String buttonText) { |
|
String buttonXpath=String.format(parameterizedButton, buttonText); |
|
WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); |
|
WebDriverWait wait=new WebDriverWait(getDriver(),15); |
|
wait.until(ExpectedConditions.elementToBeClickable(elem)); |
|
elem.click(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file)? I verify (.*) breadcrumb near to property breadcrumb |
|
|
|
|
|
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; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I select the role user |
|
|
|
|
|
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); |
|
clickOn(elem); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I add it again |
|
|
|
|
|
public void iAddItAgain() { |
|
storePage.addToCart(context.product.getName()); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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)); |
|
signUpSecondScreenPage.enterCity(data.get(0).get(3)); |
|
signUpSecondScreenPage.selectState(data.get(0).get(4)); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I accept Hawaii Disclosure |
|
|
|
|
|
public void acceptHawaiiDisclosure() { |
|
waitFor(acceptHawaiiDisclosureButton); |
|
JavascriptExecutor js = (JavascriptExecutor) getDriver(); |
|
// getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='__PrivateStripeElement']//iframe[1]""))); |
|
// JavascriptExecutor js = (JavascriptExecutor) getDriver(); |
|
waitFor(5000); |
|
js.executeScript(""window.scrollBy(0,550)"", """"); |
|
clickOn(acceptHawaiiDisclosureButton); |
|
getDriver().switchTo().defaultContent(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I validate that (.*) field is prepopulated with (.*) 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; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
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""))) { |
|
signUpFirstPage.enterEmail(commonPage.fetchDataFromDataProperties(data.get(0).get(2))); |
|
signUpFirstPage.enterMobileNumber(commonPage.fetchDataFromDataProperties(data.get(0).get(3))); |
|
} |
|
else{ |
|
signUpFirstPage.enterEmail(data.get(0).get(2)); |
|
signUpFirstPage.enterMobileNumber(data.get(0).get(3)); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I fetch OTP of 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; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I place an order |
|
|
|
|
|
public CheckoutPage placeOrder() { |
|
waitForOverlaysToDisappear(overlay); |
|
click(placeOrderBtn); |
|
return this; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I verify that logged in user is at top with mentioned and does not have delete and edit icon |
|
|
|
|
|
public void WhenIVerifyThatLoggedInUserIsAtTopWithMentionedAndDoesNotHaveDeleteAndEditIcon() |
|
{ |
|
userManagementPage.varifyLoggedInUserShouldOnTOpOfGrid(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
validate number of users asign to selected location or group |
|
|
|
|
|
public void ThenValidateNumberOfUsersAsignToSelectedLocationOrGroup() |
|
{ |
|
System.out.println(userManagementPage.getNumOfUsers()); |
|
|
|
} |
|
|
|
|
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I see empty OTP textfields in Signup |
|
|
|
|
|
public void validateEmptyOtpTextfields() { |
|
signUpSecondScreenPage.validateOtpIsEmpty(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
This is for invalid locators |
|
|
|
|
|
public void thisIsForInvalidLocators() { |
|
homePage.getInvalidLocators(); |
|
} |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I verify No payment available is displayed |
|
|
|
|
|
public void verifyNoPaymentavailable() { |
|
dashboardPage.verifyNoPaymentavailable(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I verify tooltip text |
|
|
|
|
|
public String getToolTipText() { |
|
waitFor(toolTip); |
|
String ActualTotalNetMeteringToolTipText=toolTip.getText(); |
|
return ActualTotalNetMeteringToolTipText; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
After fetching data from data file )?I enter group name (.*) in group pop up |
|
|
|
|
|
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; |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I (dont )?get error message (.*) for OTP textfields |
|
|
|
|
|
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.getValue(); |
|
break; |
|
case ""EMAIL_MAX_50_CHARS"": |
|
expectedError=LoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); |
|
break; |
|
case ""INCORRECT_OTP"": |
|
expectedError=LoginErrorMessagesEnum.INCORRECT_OTP.getValue(); |
|
break; |
|
case ""INCOMPLETE_OTP"": |
|
expectedError=LoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); |
|
break; |
|
case ""INVALID_SESSION"": |
|
expectedError=LoginErrorMessagesEnum.INVALID_SESSION.getValue(); |
|
break; |
|
case ""INCORRECT_PASSWORD"": |
|
expectedError=LoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); |
|
break; |
|
case ""USER_DISABLED"": |
|
expectedError=LoginErrorMessagesEnum.USER_DISABLED.getValue(); |
|
break; |
|
default: |
|
throw new Exception(""This Expected Error in feature file is not present in the list of expected errors in switch case or Enum file""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I select Flag customer application |
|
|
|
|
|
public void flagCustomer() { |
|
adminLoginPage.clickFlagCustomer(); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I should see an error |
|
|
|
|
|
public String getValidationMsg() { |
|
return getElementElementCustomAttribute(quantityInputFld, ""validationMessage""); |
|
}" |
|
" |
|
|
|
|
|
|
|
|
|
I click on pencil icon to edit group |
|
|
|
|
|
public void ThenIClickOnPencilIconToEditGroup() |
|
{ |
|
userManagementPage.clickOnPencilIconToEditGroup(); |
|
}" |
|
|