diff --git "a/train.csv" "b/train.csv" new file mode 100644--- /dev/null +++ "b/train.csv" @@ -0,0 +1,6141 @@ +text +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see secondary static text (.*) in Login screen + +### Output: +public void validateSecondaryStaticText(String expectedStaticText) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + loginFirstScreenPage.validateSecondaryStaticText(expectedStaticText); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Login page is displayed + +### Output: +public boolean emailLoginPageIsDisplayed() { + loginHeaderTitle.isDisplayed(); + emailField.isDisplayed(); + selanjutnyaButton.isDisplayed(); + loginFacebookButton.isDisplayed(); + loginGoogleButton.isDisplayed(); + registerQuestionText.isDisplayed(); + registerLink.isDisplayed(); + return true; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see empty OTP textfields + +### Output: +public void validateOtpIsEmpty() { + otpTextFields.waitUntilVisible(); + String a=otpTextFields.getText(); + Assert.assertTrue(a.equals("""")); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter all the details for signing up in Signup Screen-2 + +### Output: +public void enterAddress1(String address1) { + enter(address1).into(address1_txt); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see empty OTP textfields + +### Output: +public void validateOtpIsEmpty() { + String a=otpTextFields.getText(); + Assert.assertTrue(a.equals("""")); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I fetch OTP of Email (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I edit Address in Customer Profile + +### Output: +public void enterCity(String city) { + enter(city).into(city_txt); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click the (.*) customer on Customer grid + +### Output: +public void customerGrid(String value) { + adminLoginPage.clickCustomerGrid(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on submit button on edit user screen + +### Output: +public void clickOnSubmitEditUser(){ + SubmitButton.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers + +### Output: +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.fetchDataFromDataProperties(extension); + apiURL=apiURL+""/""+docId; + + int index=apiURL.indexOf(""1006""); + if(index>=0) + apiURL=apiURL.replace(""1006"",customerId); + + RestAssured.baseURI=apiURL; + RestAssured.useRelaxedHTTPSValidation(); + httpRequest = RestAssured.given().headers(headersMap); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I agree and click on Subscriber Agreement button on Payment screen + +### Output: +public void clickSubsciberAgreement() + { + paymentScreenPage.clickSubsciberAgreementButton(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare API headers( and pass authkey)? + +### Output: +public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOException { + headersMap=new HashMap(); + if((passAuthkey!=null)&&(passAuthkey.contains(""auth""))) + headersMap.put(""Authorization"",authKey); + headersMap.put(""x-api-key"",commonPage.fetchDataFromDataProperties(""x-api-key"")); + headersMap.put(""Accept"", ""application/json, text/plain, */*""); + headersMap.put(""Accept-Encoding"",""gzip, deflate, br""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I search for location (.*) and select searched location from dropdown + +### Output: +public void clickOnMappedLocations() { + MappedLocations.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I change Customer Status to (.* + +### Output: +public void changeCustomerStatus(String status) { + waitFor(customerStatusDropdown); + clickOn(customerStatusDropdown); + String buttonXpath=String.format(parameterizedCustomerStatus, status); + WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); + WebDriverWait wait=new WebDriverWait(getDriver(),10); + wait.until(ExpectedConditions.elementToBeClickable(elem)); + elem.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify the individual (projects|locations) in dashboard + +### Output: +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).getText()); + js = (JavascriptExecutor) getDriver(); + clickOn(individualProjectList.get(i)); + assertTrue(dashboardButton.isPresent()); + clickOn(dashboardButton); + individualProjectList = getDriver().findElements(By.xpath(""//p[@class='MuiTypography-root MuiTypography-body1 css-fb8gxk']"")); + if (viewMoreButton.isPresent()) { + WebElement element = getDriver().findElement(By.xpath(""//p[text()='View More']"")); + js.executeScript(""arguments[0].scrollIntoView(true);"", element); + js.executeScript(""arguments[0].click();"", element); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see secondary static text (.*) in Login screen + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for duplicate user + +### Output: +public void GivenIEnterGroupNameForDuplicateUser(String expectedError) throws Exception + { + userManagementPage.validateDuplicateUser(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see empty OTP textfields + +### Output: +public void validateEmptyOtpTextfields() { + loginSecondScreenPage.validateOtpIsEmpty(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Login page is displayed + +### Output: +public void loginPageIsDisplayed() { + Assert.assertTrue(loginPage.emailLoginPageIsDisplayed()); + + String actualLoginHeaderTitle = loginPage.getLoginHeaderTitle(); + Assert.assertEquals(""Silakan masuk ke akun Anda"", actualLoginHeaderTitle); + + String actualRegisterQuestionText = loginPage.getQuestionRegisterText(); + Assert.assertEquals(""Belum punya akun Bhinneka? Daftar"", actualRegisterQuestionText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on continue button in Signup Screen-1 + +### Output: +public void clickOnContinue(){ + clickOn(continue_btn); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select Flag customer application + +### Output: +public void clickFlagCustomer() { + waitFor(flagCustomerButton); + clickOn(flagCustomerButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I should get a masking on (email|mobile number) (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API with headers and payload + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on SignUp Page + +### Output: +public void clickOnSubmit() { + signupOTPPage.submitLogin(); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify create group pop up should open + +### Output: +public void varifyCreateGroupPopupOpened() { + Assert.assertTrue(createGroupHeader.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers + +### Output: +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.fetchDataFromDataProperties(extension); + apiURL=apiURL+""/""+docId; + + int index=apiURL.indexOf(""1006""); + if(index>=0) + apiURL=apiURL.replace(""1006"",customerId); + + RestAssured.baseURI=apiURL; + RestAssured.useRelaxedHTTPSValidation(); + httpRequest = RestAssured.given().headers(headersMap); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) project)? + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on property (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add {int} quantity to the cart + +### Output: +public void enterQuantity(int quantity) { + clearAndSendKeys(quantityInputFld, Integer.toString(quantity)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see static text (.*) in Login screen + +### Output: +public void validateStaticText(String expectedStaticText) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + loginFirstScreenPage.validateStaticText(expectedStaticText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?see textfield Referral code in Onboarding screen + +### Output: +public void validateTextfieldReferralCode(String dontFlag) { + if(dontFlag==null) + referralCodeTextfield.shouldBePresent(); + else if(dontFlag.contains(""dont"")) + referralCodeTextfield.shouldNotBePresent(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to dashboard + +### Output: +public void landDashboard() { + welcomeDashboard.shouldBeVisible(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I verify (.*) sunshine factor with (.* + +### Output: +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=getJsonPath(response,key).substring(1, (l-1)); + double sumOfAll=0.0; + int responseSize=0; + responseSize=response.body().jsonPath().getList(""cityPerformanceDataTOs"").size(); + String[] arr = null; + arr=value.split("",""); + for(int i=0;i> 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)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I navigate to (.*) Onboarding screen + +### Output: +// public void validateHeadingThankYouForYourPatience(String heading) { +// onboardingLastScreenPage.validateHeading(heading); +// } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare API headers( and pass authkey)? + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Product detail with {string} type is displayed + +### Output: +public boolean defaultProductDetailPageIsDisplayed() { + Wait.untilAjaxCallIsDone(webDriver, 10L); + allProductImageList.get(0).isDisplayed(); + namaProductDetail.isDisplayed(); + skuProductDetail.isDisplayed(); + starProductDetail.isDisplayed(); + hargaProductDetail.isDisplayed(); + cicilanProductDetail.isDisplayed(); + jumlahProductDetail.isDisplayed(); + jumlahProductDetailInput.isDisplayed(); + informasiTokoProductDetail.isDisplayed(); + overviewPanel.isDisplayed(); + emailButton.isDisplayed(); + beliButton.isDisplayed(); + return true; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on Billing history table reccords(.* + +### Output: +public void clickOnArrowToOpenProjectTable(String PName){ + String buttonXpath=String.format(parameterizedTab, PName); + WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); + waitFor(elem); + clickOn(elem); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should see {int} {product} in the cart + +### Output: +public void iShouldSeeInTheCart(int quantity, Product product) { + Assert.assertEquals(product.getName(), cartPage.getProductName()); + Assert.assertEquals(quantity, cartPage.getProductQuantity()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the incorrect OTP (.*) in Login screen + +### Output: +public void enterIncorrectOTP(String incorrectOtp) { + loginSecondScreenPage.enterOtp(incorrectOtp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify Project list for (Carbon|Billing + +### Output: +public void verifyCarbon_Billing_IndividualProjects(String value) { + waitFor(findAProjectOrLocationDropdown); + findAProjectOrLocation = getDriver().findElement(By.xpath(""(//div[@id='demo-simple-select-outlined'])[2]"")); + List findAProjectTexts=new ArrayList(); + System.out.println(""Project dropdown is: "" + findAProjectOrLocation.isEnabled()); + assertTrue(findAProjectOrLocation.isEnabled()); + js = (JavascriptExecutor) getDriver(); + js.executeScript(""arguments[0].click();"", findAProjectOrLocation); + findAProjectOrLocation.click(); + waitABit(1000); + dropdownProjectList = getDriver().findElements(By.xpath(""//ul[@role='listbox']/li"")); + dropdownList = new ArrayList(); + for (int i = 0; i < dropdownProjectList.size(); i++) { + if(i!=0) { + findAProjectOrLocation = getDriver().findElement(By.xpath(""(//div[@id='demo-simple-select-outlined'])[2]"")); + findAProjectOrLocation.click(); + waitABit(1000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (.*) tab + +### Output: +public void clickTab(String tabText) { + String buttonXpath=String.format(parameterizedTab, tabText); + WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); + WebDriverWait wait=new WebDriverWait(getDriver(),10); + wait.until(ExpectedConditions.elementToBeClickable(elem)); + elem.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I edit group name to (.* + +### Output: +public void enterGroupName(String groupname) { + groupName.clear(); + typeInto(groupName,groupname); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I Validate user firstname (.*) and lastname (.*) is edited + +### Output: +public void ThenIValidateUserFirstnameUsereditedAndLastnameUsereditedIsEdited(String file,String firstname , String lname) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + firstname=commonPage.fetchDataFromDataProperties(firstname); + userManagementPage.ValidateUserInfoIsEdited(firstname+generatedString +"" ""+firstname+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) Utility Usage Document + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that heading will be Edit User + +### Output: +public void varifyEditUserHeading() { + Assert.assertTrue(editUserHeading.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter in Referral code textfield \([\]*)\ in Onboarding screen + +### Output: +public void enterSpecialCharInReferralCode(String value) { + typeInto(referralCodeTextfield,value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I accept Hawaii Disclosure + +### Output: +public void acceptDisclosure() { + paymentScreenPage.acceptHawaiiDisclosure(); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) LMI Bill Document + +### Output: +public void uploadLMIDocument(String file, String value) throws AWTException, IOException { + if ((file != null) && (file.contains(""data file""))) + value = commonPage.fetchDataFromDataProperties(value); + adminLoginPage.uploadLMIDocument(value); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see static (text|subtext) (.*) in Onboarding screen + +### Output: +public void validateStaticText(String textOrSubtext, String expectedStaticText) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + expandingFarmsScreenPage.validateStaticText(textOrSubtext,expectedStaticText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter (.*) utility account number + +### Output: +public void UtilityAccountNumber(String utilityAccountNumber) + { + adminLoginPage.enterUtilityAccountNumber(utilityAccountNumber); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the Save button on Admin Page + +### Output: +public void clickSave() { + waitFor(5000); + waitFor(saveButton); + clickOn(saveButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Resend OTP in Signup + +### Output: +public void resendOtp() { + signUpSecondScreenPage.resendOtp(); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see textfield Referral code prepopulated with (.*) in Onboarding screen + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I clicks on User Management tab + +### Output: +public void WhenIClicksOnUserManagementTab() + { + userManagementPage.clickOnUserManagementTab(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I select (.*) from dropdown + +### Output: +public void ThenAfterFetchingDataFromDataFileISelectPropertyNameFromDropdown(String file,String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + propertyDetailsPage.clickOnSelectALocation(); + propertyDetailsPage.selectProjectFromDropdown(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on create group pop up + +### Output: +public void clickOnSubmitCreateGroupButton() { + submitCreateGroup.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select property (.*) from dropdown + +### Output: +public void GivenISelectPropertyFromDropdown(String PropertyName) + { + propertyDetailsPage.clickOnSelectALocation(); + propertyDetailsPage.selectProjectFromDropdown(PropertyName); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on submit button on edit user screen + +### Output: +public void ThenIClickOnSubmitButtonOnEditUserScreen() throws InterruptedException + { + userManagementPage.clickOnSubmitEditUser(); + Thread.sleep(5000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on edit group pop up + +### Output: +public void ThenIClickOnSubmitButtonOnEditGroupPopUp() + { + userManagementPage.clickOnSubmitEditGroupButton(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I validate group (.*) is created or edited + +### Output: +public void ThenIValidateGroupAutomationNewGroupIsCreatedOrEdited(String file,String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + userManagementPage.verifyGroupCreatedOrUpdated(value+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Input credentials to login with headers table + +### Output: +public void fillEmailData(String email) { + emailField.isEnabled(); + emailField.clear(); + emailField.sendKeys(email); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify groups pop up should open + +### Output: +public void varifyGroupsPopupOpened() { + Assert.assertTrue(groupsHeader.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I agree to opt for the solar power in Benefit Onboarding screen + +### Output: +public void clickGetStarted() { + benefitScreenPage.clickYesIAmInButton(); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields + +### Output: +public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception { + if((dontFlag!=null)&&(dontFlag.contains(""dont""))) { + expectedError=null; + loginSecondScreenPage.validateNoErrorMessage(); + } + else { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + loginSecondScreenPage.validateErrorMessage(expectedError); + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I provide billing details + +### Output: +public void iProvideBillingDetails() { + /* + * context.billingDetails -> We are using the same billing details set in + * CustomerStepDefinitions (Method: myBillingDetailsAre()) + */ + checkoutPage.setBillingDetails(context.billingDetails); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I edit firstname and last name as (.* + +### Output: +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); + userManagementPage.enterLastName(value+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see empty OTP textfields in Signup + +### Output: +public void validateOtpIsEmpty() { + String a=otpTextFields.getText(); + Assert.assertTrue(a.equals("""")); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add {int} quantity + +### Output: +public void iSelectQuantity(int quantity) { + productPage.enterQuantity(quantity); + productPage.pressAddToCartBtn(); + context.product = new Product(); + context.product.setQuantity(quantity); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the Save button on Admin Page popup + +### Output: +public void clickSavePopup() { + adminLoginPage.clickSavePopup(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) project)? + +### Output: +public String preparePayload(String file, String email, String apiName, String anyProject, String specificProject) throws IOException { + + if((file!=null) && (file.contains(""data file""))) { + email=commonPage.fetchDataFromDataProperties(email); + } + + clientid=commonPage.fetchDataFromDataProperties(""clientId""); + + 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; + default: + if(anyProject!=null) { + payload=String.format(projectParameterizedPayload, commonPage.fetchDataFromDataProperties(specificProject)); + } + } + System.out.println(""Session/Authkey/Consent/Income/Other API payload is: ""+payload); + return payload; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I navigate to (.*) Onboarding screen + +### Output: +public void validateHeading(String headingText) { +// WebElementFacade welem=(WebElementFacade) getDriver().findElement(By.xpath(String.format(heading, headingText))); +// waitFor(welem); +// }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the (Carbon|Billing|Data Health|Income|Documents|\'Help And Support\') button in left panel of dashboard + +### Output: +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(value.contains(""Help And Support"")) + dashboardPage.clickHelpAndSupport(); + else if(value.contains(""Income"")) + dashboardPage.clickIncome(); + else if(value.contains(""Documents"")) + dashboardPage.clickDocuments(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Search product with {string} keyword + +### Output: +public void searchProductWithKeyword(String productName) { + homePage.searchProductData(productName); + testContext.scenarioContext.setContext(Context.EXPECTED_DATA, productName); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that (project|location) dropdown list is same as list of individual (projects|locations) in dashboard + +### Output: +public void verifyProjectLists(String projectOrLocationsDropdown, String individualProjectsOrLocations){ + if((projectOrLocationsDropdown.contains(""project""))&&(individualProjectsOrLocations.contains(""project""))) { + dashboardPage.verifyProjectLists(); + }else if((projectOrLocationsDropdown.contains(""location""))&&(individualProjectsOrLocations.contains(""location""))) { + dashboardPage.verifyLocationLists(); + } + + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on see details + +### Output: +public void GivenIClickOnSeeDetails() + { + propertyDetailsPage.clickOnSeeDetails(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate Success message should visible + +### Output: +public void validateSuccessPopupAndMessage() { + Assert.assertTrue(success.isDisplayed()); + Assert.assertTrue(successMessage.isDisplayed()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I select (.*) from dropdown + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate that name, role, last active, member since & mapped locations columns should be visible + +### Output: +public void ThenIValidateThatNameRoleLastActiveMemberSinceMappedLocationsColumnsShouldBeVisible() + { + userManagementPage.varifyGridColumnsArePresent(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for mapped locations + +### Output: +public void ThenIGetErrorMessageForMappedLocations(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Mapped Location(s)"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to Login screen + +### Output: +public void validateLandedOnLoginScreen() { + waitFor(sendMeACodeButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I assign (.*) Project + +### Output: +public void assignProject(String projectName) { + waitFor(projectDropdown); + clickOn(projectDropdown); + String buttonXpath=String.format(parameterizedProject, projectName); + WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); + WebDriverWait wait=new WebDriverWait(getDriver(),10); + wait.until(ExpectedConditions.elementToBeClickable(elem)); + elem.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select property (.*) from dropdown + +### Output: +public void clickOnSelectALocation() { + clickOn(selectALocation); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on all location dropdown + +### Output: +public void clickOnAllLocations() { + allLocations.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare headers for (.*) API + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I Validate user firstname (.*) and lastname (.*) is edited + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify delete user pop up should open + +### Output: +public void varifyDeleteUserPopupOpened() { + Assert.assertTrue(deleteUserPopup.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on group (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email + +### Output: +public void ThenIGetErrorMessageForEmail(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Email ID"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Input credentials to login without headers + +### Output: +public void inputCredentialsToLoginWithoutHeaders(DataTable dataTable) { + List dataRow = dataTable.row(0); + String email = dataRow.get(0); + + System.out.println(""row index 0 --- "" + email); + loginPage.fillEmailData(email); + System.out.println(""row index 1 --- "" + dataRow.get(1)); + System.out.println(""row index 2 --- "" + dataRow.get(2)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify (.*) in selected in dropdown and on property detail page is same + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen + +### Output: +public void waitForStaticText(String textOrSubText, String expectedStaticText, String screen) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + commonPage.waitForStaticText(textOrSubText,expectedStaticText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter (.*) utility account number + +### Output: +public void enterUtilityAccountNumber(String utilityAccountNumber) { + waitFor(utilityAccountNumber_txt); + typeInto(utilityAccountNumber_txt, utilityAccountNumber); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify No payment available is displayed + +### Output: +public void verifyNoPaymentavailable() { + waitFor(noPaymentText); + assertEquals(noPaymentText.getText(), ""No payment available""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for lastname + +### Output: +public void ThenIGetErrorMessageForLastname(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Last Name"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Sign Out on dashboard + +### Output: +public void clickSignOut(){ + dashboardPage.signOut(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I am on Onboarding screen with (.*) referral code + +### Output: +public void onOnboardingScreenWithReferralCode(String file, String referralCode) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + referralCode=commonPage.fetchDataFromDataProperties(referralCode); + onboardingFirstScreenPage.openReferralLink(referralCode); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I have {int} {product} in the cart + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in Signup mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for mobile_number + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify create group pop up should open + +### Output: +public void ThenIVerifyCreateGroupPopUpShouldOpen() + { + userManagementPage.varifyCreateGroupPopupOpened(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in Signup email textfield + +### Output: +public void enterEmail(String file, String value) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + signUpFirstPage.enterLoginEmail(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )I search for (.*) in search box + +### Output: +public void searchItem(String file, String search) throws IOException { + if((file!=null)&&(file.contains(""data file""))) + search=commonPage.fetchDataFromDataProperties(search); + billingPage.searchItem(file, search); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (.*) button + +### Output: +public void clickButton(String buttonText) { + String buttonXpath=String.format(parameterizedButton, buttonText); + WebElement elem=getDriver().findElement(By.xpath(buttonXpath)); + WebDriverWait wait=new WebDriverWait(getDriver(),10); + wait.until(ExpectedConditions.elementToBeClickable(elem)); + elem.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Home page without authorizations + +### Output: +public boolean defaultHomePageIsDisplayed() { + headerLogoButton.isDisplayed(); + searchInput.isDisplayed(); + cartButton.isDisplayed(); + bhinnekaCopyrightFooter.isDisplayed(); + return true; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers + +### Output: +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""); + if(index>=0) + apiURL=apiURL.replace(""1006"", customerId); + + RestAssured.baseURI=apiURL; + RestAssured.useRelaxedHTTPSValidation(); + httpRequest = RestAssured.given().headers(headersMap); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I successfully download the Bill + +### Output: +public void downloadBill() { + clickOn(download_button); + String downloadPath = ""C:\\Users\\siddharth.rawat\\Downloads""; + File file = new File(downloadPath); + if (file.exists()) { + System.out.println(downloadPath + "" is present""); + + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the incorrect OTP (.*) in Signup screen + +### Output: +public void enterOtp(String correctOtp) { + waitFor(otpTextFields); + typeInto(otpTextFields,correctOtp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +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 + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on question mark on total net metering panel + +### Output: +public void clickOnToolTip() { + clickOn(questionMark); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should see the banner with text {string} + +### Output: +public void iShouldSeeTheBannerWithTxt(String text) { + Assert.assertTrue(productPage.getBannerTxt().contains(text), + ""Expected: "" + text + "", ACTUAL: "" + productPage.getBannerTxt()); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in Signup email textfield + +### Output: +public void enterEmail(String file, String value) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + signUpFirstPage.enterLoginEmail(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see static text (.*) in Login screen + +### Output: +public void validateStaticText(String expectedStaticText) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + loginFirstScreenPage.validateStaticText(expectedStaticText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the correct OTP in SignUp screen + +### Output: +public void enterOtp(String correctOtp) { + waitFor(otpTextFields); + typeInto(otpTextFields,correctOtp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter all the details for signing up in Signup Screen-1 + +### Output: +public void enterFirstScreenSignUpDetails(String file,DataTable dataTable) throws IOException { + List> 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)); + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield + +### Output: +public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + loginFirstScreenPage.validatePrepopulatedEmailOrMobileTextfield(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield + +### Output: +public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception { + switch(expectedError) { + case ""INVALID_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); + break; + case ""INVALID_EMAIL_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); + break; + case ""INVALID_EMAIL_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_MOBILE_ERROR.getValue(); + break; + case ""EMAIL_MAX_50_CHARS"": + expectedError=SupReferralLoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); + break; + case ""INCORRECT_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_OTP.getValue(); + break; + case ""INCOMPLETE_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); + break; + case ""INVALID_SESSION"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_SESSION.getValue(); + break; + case ""INCORRECT_PASSWORD"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); + break; + case ""REFERRAL_CODE_NOT_EXIST"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_NOT_EXIST.getValue(); + break; + case ""REFERRAL_CODE_SPECIAL_CHARACTER"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_SPECIAL_CHARACTER.getValue(); + break; + case ""USER_DISABLED"": + expectedError=SupReferralLoginErrorMessagesEnum.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on edit user button on user info pop up + +### Output: +public void ThenIClickOnEditUserButtonOnUserInfoPopUp() + { + userManagementPage.clickOnEditUserInfo(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I change rows per page + +### Output: +public void changeRows() { + waitFor(rowsPerPage); + if(rowsPerPage.isEnabled()){ + clickOn(rowsPerPage); + clickOn(tenrows); + clickOn(rowsPerPage); + clickOn(twentyfiverows); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to dashboard + +### Output: +public void reachedDashboard() { + waitFor(logoutLink); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on SignUp Page + +### Output: +public void submitLogin() { + getStarted.click(); + waitABit(10000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on property (.* + +### Output: +public void ThenIClickOnPropertyName(String file, String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + propertyDetailsPage.clickBreadcrumbLink(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify (.*) breadcrumb near to property breadcrumb + +### Output: +public void GivenIVerifyProjectBreadcrumbNearToPropertyBreadcrumb(String file, String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + propertyDetailsPage.varifyBreadcrumbIsPresent(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I wait for message that Your Bill is Uploaded + +### Output: +public void verifyBillIsUploaded() { + waitFor(billUploadedMsg); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see textfield Referral code prepopulated with (.*) in Onboarding screen + +### Output: +public void isReferralCodePrepopulatedWith(String file, String referralCode) throws Exception { + if((file!=null)&&(file.contains(""data file""))) + referralCode=commonPage.fetchDataFromDataProperties(referralCode); + expandingFarmsScreenPage.isReferralCodePrepopulatedWith(referralCode); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the correct OTP in SignUp screen + +### Output: +public void enterOTP(){ + signupOTPPage.enterOtp(otp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Sign Out on dashboard + +### Output: +public void signOut() { + waitFor(logoutLink); + clickOn(logoutLink); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Go Back in Signup + +### Output: +public void goBack() { + goBack.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate user is deleted + +### Output: +public void verifyUserIsDeleted() { + Assert.assertTrue(noUserAvailable.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Send me a code + +### Output: +public void sendMeACode() { + adminLoginPage.clickSendMeACode(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields + +### Output: +public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception { + switch(expectedError) { + case ""INVALID_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); + break; + case ""INVALID_EMAIL_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); + break; + case ""INVALID_EMAIL_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_MOBILE_ERROR.getValue(); + break; + case ""EMAIL_MAX_50_CHARS"": + expectedError=SupReferralLoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); + break; + case ""INCORRECT_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_OTP.getValue(); + break; + case ""INCOMPLETE_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); + break; + case ""INVALID_SESSION"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_SESSION.getValue(); + break; + case ""INCORRECT_PASSWORD"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); + break; + case ""REFERRAL_CODE_NOT_EXIST"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_NOT_EXIST.getValue(); + break; + case ""REFERRAL_CODE_SPECIAL_CHARACTER"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_SPECIAL_CHARACTER.getValue(); + break; + case ""USER_DISABLED"": + expectedError=SupReferralLoginErrorMessagesEnum.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on all location dropdown + +### Output: +public void ThenIClickOnAllLocationDropdown() + { + userManagementPage.clickOnAllLocations(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify No document available is displayed + +### Output: +public void verifyNoDocumentavailable() { + dashboardPage.verifyNoDocumentavailable(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in Signup email textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Delete Group button on delete group pop up + +### Output: +public void ThenIClickOnDeleteGroupButtonOnDeleteGroupPopUp() + { + userManagementPage.clickDeleteGroupOnPopup(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that (project|location) dropdown list (projects|locations) in dashboard + +### Output: +public void verifyLeftPannelProjectsOrLocations(){ + waitFor(findAProjectOrLocationDropdown); + findAProjectOrLocation = getDriver().findElement(By.xpath(""//div[@id='demo-simple-select-outlined']/span"")); + List findAProjectTexts=new ArrayList(); + System.out.println(""Project dropdown is: "" + findAProjectOrLocation.isEnabled()); + assertTrue(findAProjectOrLocation.isEnabled()); + js = (JavascriptExecutor) getDriver(); + js.executeScript(""arguments[0].click();"", findAProjectOrLocation); + findAProjectOrLocation.click(); + waitABit(1000); + dropdownProjectList = getDriver().findElements(By.xpath(""//ul[@role='listbox']/li"")); + dropdownList = new ArrayList(); + for (int i = 0; i < dropdownProjectList.size(); i++) { + if(i!=0) { + findAProjectOrLocation = getDriver().findElement(By.xpath(""//div[@id='demo-simple-select-outlined']/span"")); + findAProjectOrLocation.click(); + waitABit(1000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add {int} quantity + +### Output: +public void enterQuantity(int quantity) { + clearAndSendKeys(quantityInputFld, Integer.toString(quantity)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield in Signup + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare headers for (.*) API + +### Output: +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(""authkeyAPIAmzTarget""); + + headersMap.put(""Content-Type"",""application/x-amz-json-1.1""); + headersMap.put(""x-amz-target"",target); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should see the banner with text {string} + +### Output: +public String getBannerTxt() { + return getElementText(bannerTxt); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I place an order + +### Output: +public void iPlaceAnOrder() { + checkoutPage.placeOrder(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter (.*) usage in Allocated Usage + +### Output: +public void enterAllocatedUsage(String usage) { + waitFor(allocatedUsage_txt); + typeInto(allocatedUsage_txt, usage); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I change Customer Status to (.* + +### Output: +public void changeStatus(String status) + { + adminLoginPage.changeCustomerStatus(status); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see static (text|subtext) (.*) in Onboarding screen + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I search for (.*) in search box + +### Output: +public void searchColumn(String file, String search) throws IOException { + if((file!=null)&&(file.contains(""data file""))) + search=commonPage.fetchDataFromDataProperties(search); + adminLoginPage.searchColumn(search); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that heading will be Edit User + +### Output: +public void ThenIVerifyThatHeadingWillBeEditUser() + { + userManagementPage.varifyEditUserHeading(); + } + + public int getRandomNumberUsingNextInt( ) { + Random random = new Random(); + return random.nextInt(9999 - 1001) + 1001; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (tenant|landlord) tab of side navigation bar + +### Output: +public void clickTenantTab() { + waitFor(tenantTab); + clickOn(tenantTab); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields + +### Output: +public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception { + if((dontFlag!=null)&&(dontFlag.contains(""dont""))) { + expectedError=null; + loginSecondScreenPage.validateNoErrorMessage(); + } + else { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + loginSecondScreenPage.validateErrorMessage(expectedError); + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add a {product} to the cart + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click Send me a Code button + +### Output: +public void sendMeACode() { + loginFirstScreenPage.clickLoginSendMeACode(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?give consent to send me a Code to my mobile number + +### Output: +public void giveOTPConsentForMobile(String dontFlag) throws Exception { + if(dontFlag==null) + loginFirstScreenPage.giveOTPConsentForMobile(); + else + loginFirstScreenPage.dontGiveOTPConsentForMobile(); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Cancel button to close groups popup + +### Output: +public void clickCancelGroupspopup() { + clickOn(cancelGroupspopup); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for mobile_number + +### Output: +public void ThenIGetErrorMessageForMobile_Number(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Mobile Number"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate dashboard shows (.*) message + +### Output: +public void validateTextPresent(String msg) { + String path=String.format(message, msg); + WebElement elem=getDriver().findElement(By.xpath(path)); + assertTrue(elem.isDisplayed()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter all the details for signing up in Signup Screen-2 + +### Output: +public void enterAddress1(String address1) { + enter(address1).into(address1_txt); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I verify (.*) generation with (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select the role (.* + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see secondary static text (.*) in Login screen + +### Output: +public void validateSecondaryStaticText(String expectedStaticText) throws Exception { + expectedStaticText=commonPage.fetchStaticTextConstantsfromEnum(expectedStaticText); + loginFirstScreenPage.validateSecondaryStaticText(expectedStaticText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I search for (.*) in search box + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I select (.*) select a location dropdown + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) document for LMI document + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I wait for message that Your Bill is Uploaded + +### Output: +public void verifyBillIsUploaded() { + utilityScreenPage.verifyBillIsUploaded(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on delete button icon to delete user (.* + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for firstname + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I wait for (\\d+) seconds + +### Output: +public void waitForDuration(int duration) { + commonPage.waitForSometime(duration*1000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I wait for Utility provider dropdown + +### Output: +public void waitForUtilityProviderDropdown() { + utilityProviderDropdown.waitUntilVisible(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select (.*) location from the list + +### Output: +public void ThenISelectLocationFromTheList(int locationNumberInDropdown) throws InterruptedException + { + userManagementPage.clickOnMappedLocations(); + userManagementPage.selectNthLocationFromThedropdown(locationNumberInDropdown); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on delete button icon to delete user (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for referral code textfield + +### Output: +public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception { + switch(expectedError) { + case ""INVALID_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); + break; + case ""INVALID_EMAIL_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); + break; + case ""INVALID_EMAIL_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_MOBILE_ERROR.getValue(); + break; + case ""EMAIL_MAX_50_CHARS"": + expectedError=SupReferralLoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); + break; + case ""INCORRECT_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_OTP.getValue(); + break; + case ""INCOMPLETE_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); + break; + case ""INVALID_SESSION"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_SESSION.getValue(); + break; + case ""INCORRECT_PASSWORD"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); + break; + case ""REFERRAL_CODE_NOT_EXIST"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_NOT_EXIST.getValue(); + break; + case ""REFERRAL_CODE_SPECIAL_CHARACTER"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_SPECIAL_CHARACTER.getValue(); + break; + case ""USER_DISABLED"": + expectedError=SupReferralLoginErrorMessagesEnum.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I add API params with parameter (.*) as (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify the individual (projects|locations) in dashboard + +### Output: +public void verifyIndividualProjects(String projectOrLocation) { + if(projectOrLocation.contains(""project"")) { + dashboardPage.verifyIndividualProjects(); + } else if(projectOrLocation.contains(""location"")) { + dashboardPage.verifyIndividualLocations(); + } + + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that (project|location) dropdown list is same as list of individual (projects|locations) in dashboard + +### Output: +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()); + js = (JavascriptExecutor) getDriver(); + js.executeScript(""arguments[0].click();"", findAProjectOrLocation); + findAProjectOrLocation.click(); + waitABit(1000); + + List dropdownProjectList = getDriver().findElements(By.xpath(""//ul[@role='listbox']/li"")); + List dropdownList = new ArrayList(); + for (int i = 0; i < dropdownProjectList.size(); i++) { + dropdownList.add(dropdownProjectList.get(i).getText()); + System.out.println(""dropdown project "" + i + "" : "" + dropdownList.get(i)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter (card|US bank account) details for utility savings + +### Output: +public void enterCardDetails(String type, DataTable dt){ + List list=dt.asList(String.class); + if(type.contains(""card"")) + stripePaymentScreenPage.enterCardDetails(list.get(0),list.get(1),list.get(2), list.get(3)); + else if(type.contains(""bank"")) + stripePaymentScreenPage.enterAccountDetails(list.get(0),list.get(1),list.get(2)); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I change rows per page + +### Output: +public void change_rows() { + billingPage.changeRows(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Input credentials to login with headers table + +### Output: +public void inputCredentialsToLoginWithHeadersTable(DataTable dataTable) { + List> dataRow = dataTable.asMaps(String.class,String.class); + + //Use for...loop if you have multiple data table + for (Map dataMap : dataRow) { + String email = dataMap.get(""Email""); + loginPage.fillEmailData(email); + System.out.println(""row header email "" + email); + System.out.println(""row index 1 --- "" + dataMap.get(""Password"")); + System.out.println(""row index 2 --- "" + dataMap.get(""Account Type"")); + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Input data with {string} in search bar + +### Output: +public void inputDataSearch(String data) { + homePage.setSearchInput(data); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I zoom out in browser + +### Output: +public void zoomOut() throws AWTException{ + commonPage.zoomOut(); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter firstname (.*), lastname (.*) mobile number (.*) and email (.* + +### Output: +public void enterFirstName(String firstname) { + firstName.clear(); + firstName.sendKeys(firstname); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on continue button in Signup Screen-1 + +### Output: +public void clickOnContinueButton(){ + signUpFirstPage.clickOnContinue(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate Success message should visible + +### Output: +public void ThenIValidateSuccessMessageShouldVisible() + { + userManagementPage.validateSuccessPopupAndMessage(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (.*) button + +### Output: +public void clickButton(String buttonText) { + commonPage.clickButton(buttonText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in email or mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the close button on Admin Page popup + +### Output: +public void clickClosePopup() { + waitFor(closePopupButton); + clickOn(closePopupButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (.*) button + +### Output: +public void clickButton(String buttonText) { + commonPage.clickButton(buttonText); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that total net metering panel is visible + +### Output: +public void ThenIVarifyTotalNetMeteringPanelIsVisible() + { + propertyDetailsPage.varifyTotalNetMeteringIsVisible(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the correct Email OTP in Login screen + +### Output: +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.switchTo().window(newTabID); + return newTabID; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click outside + +### Output: +public void clickOutside() { + commonPage.clickOutside(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see static text (.*) in Login screen + +### Output: +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"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN1_SECONDARY_STATIC_TEXT_HEADING.getValue(); + break; + case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue(); + break; + case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate dashboard shows (.*) message + +### Output: +public void validateTextPresent(String msg){ + commonPage.validateTextPresent(msg); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I wait for message that Your Document is Uploaded + +### Output: +public void verifyDocumentIsUploaded() { + waitFor(documentUploadedMsg); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Product detail with {string} type is displayed + +### Output: +public void productDetailWithType(String type) { + Assert.assertTrue(productDetailPage.defaultProductDetailPageIsDisplayed()); + + switch (type) { + case ""non fisik"": + Assert.assertTrue(productDetailPage.nonFisikProductDetailDataIsDisplayed()); + break; + case ""fisik"": + Assert.assertTrue(productDetailPage.fisikProductDetailDataIsDisplayed()); + break; + } + + String actualBreadcrumbName = productDetailPage.getAllBreadcrumbName(3).toLowerCase(); + String expectedBreadcrumbName = testContext.scenarioContext.getContext(Context.EXPECTED_DATA).toString().toLowerCase(); + Assert.assertTrue(actualBreadcrumbName.contains(expectedBreadcrumbName)); + + Assert.assertTrue(productDetailPage.moreBreadcrumbIsDisplayed()); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for lastname + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I change to (.*) filter + +### Output: +public void changeFilter(String filter){ + if(filter.contains(""1M"")) + clickOn(oneMonthFilter); + else if(filter.contains(""6M"")) + clickOn(sixMonthFilter); + else if(filter.contains(""1Y"")) + clickOn(oneYearFilter); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I verify (.*) generation with (.* + +### Output: +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(response,key).substring(1, (l-1)); + double sumOfAll=0.0; + double sumOfAllPlus=0.0; + int responseSize=0; + responseSize=response.body().jsonPath().getList(""cityPerformanceDataTOs"").size(); + String[] arr = null; + arr=value.split("",""); + for(int i=0;i100000){ + sumOfAll=sumOfAll/10; + sumOfAll=Math.round(sumOfAll); + sumOfAll=sumOfAll/100; + } + sumOfAllPlus=sumOfAll+0.01; + String val=df.format(sumOfAll); + String valPlus=df.format(sumOfAllPlus); + String total=getJsonPath(response,totalgen); + assertTrue(val.equals(total)||(valPlus.equals(total))); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Search product link with {string} data is displayed + +### Output: +public void searchProductLinkWithDataIsDisplayed(String data) { + String dataLowerCase = data.toLowerCase(); + String actualSearchProductLink = homePage.getSearchProductLink().toLowerCase(); + + Assert.assertEquals(""tampilkan pencarian dari "" + dataLowerCase, actualSearchProductLink); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter in Referral code textfield \([\]*)\ in Onboarding screen + +### Output: +public void enterSpecialCharInReferralCode(String value) throws Throwable { + expandingFarmsScreenPage.enterSpecialCharInReferralCode(value); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on edit user button on user info pop up + +### Output: +public void clickOnEditUserInfo() { + clickOn(EditUserInfo); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API for customer id (\\d+) with headers + +### Output: +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""); +// if(index>=0) +// apiURL=apiURL.replace(""1006"", customerId); + + RestAssured.baseURI=apiURL; + RestAssured.useRelaxedHTTPSValidation(); + httpRequest = RestAssured.given().headers(headersMap); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter all the details for signing up in Signup Screen-1 + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the Save button on Admin Page + +### Output: +public void clickSave() { + adminLoginPage.clickSave(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify (.*) user is created or edited + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Go to cart page without authorizations + +### Output: +public void clickCartButton() { + cartButton.isEnabled(); + cartButton.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I enter first name (.*), last name, phone number, email id and role in edit user popup + +### Output: +public void ThenIEnterFirstNameLastNamePhoneNumberEmailIdAndRoleInEditUserPopup(String file, String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + userManagementPage.enterFirstName(value+generatedString); + userManagementPage.enterLastName(value+generatedString); + userManagementPage.enterEmail(value+generatedString+""" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify (.*) user is created or edited + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I use {word} arrow to change the quantity + +### Output: +public int updateQuantityUsingArrows(String direction) { + switch (direction) { + case ""up"": { + waitForElementToBeClickable(quantityInputFld).sendKeys(Keys.ARROW_UP); + break; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare headers for (.*) API + +### Output: +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(""authkeyAPIAmzTarget""); + + headersMap.put(""Content-Type"",""application/x-amz-json-1.1""); + headersMap.put(""x-amz-target"",target); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I searched for (.*) user + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I add API params with parameter (.*) as (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Click selanjutnya button + +### Output: +public void clickSelanjutnyaButton() { + selanjutnyaButton.isEnabled(); + selanjutnyaButton.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Resend OTP + +### Output: +public void resendOtp() { + clickOn(resendButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the close button on Admin Page popup + +### Output: +public void clickClosePopup() { + adminLoginPage.clickClosePopup(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Input credentials to login without headers + +### Output: +public void fillEmailData(String email) { + emailField.isEnabled(); + emailField.clear(); + emailField.sendKeys(email); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +the selected quantity is {int} + +### Output: +public void theSelectedQuantityIs(int currentQuantity) { + productPage.enterQuantity(currentQuantity); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I add API params with parameter (.*) as (.* + +### Output: +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().minusMonths(1).withDayOfMonth(1); + Date date=fromDate.toDate(); + SimpleDateFormat formatter = new SimpleDateFormat(""yyyy-MM-dd""); + String fromdate= formatter.format(date); + paramsMap.put(paramKey, fromdate); + paramValue=fromdate; + } + else if(paramKey.equals(""toDate"")) { + LocalDate toDate=LocalDate.now().withDayOfMonth(1).minusDays(1); + Date date=toDate.toDate(); + SimpleDateFormat df=new SimpleDateFormat(""YYYY""); + SimpleDateFormat formatter = new SimpleDateFormat(""yyyy-MM-dd""); + String todate= formatter.format(date); + paramsMap.put(paramKey, todate); + paramValue=todate; + } + else + paramsMap.put(paramKey, paramValue); + System.out.println(""Param ""+paramKey+"" picked as ""+paramValue); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Select product in {int} list + +### Output: +public void selectProductInList(int list) { + Assert.assertTrue(productListPage.searchResultPageIsDisplayed()); + productListPage.selectProductInList(list); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify No document available is displayed + +### Output: +public void verifyNoDocumentavailable() { + waitFor(noDocumentText); + assertEquals(noDocumentText.getText(), ""No document available""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter (.*) in Referral code textfield in Onboarding screen + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup + +### Output: +public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + signUpFirstPage.validatePrepopulatedEmailOrMobileTextfield(value); + } + +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I fetch OTP of Email (.* + +### Output: +public String getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException { + yopMailHomePage.openNewTabAndSwitch(); + yopMailHomePage.getDriver().get(""https://yopmail.com/en/""); + if((file!=null) && (file.contains(""data file""))) + email=commonPage.fetchDataFromDataProperties(email); + yopMailHomePage.enterEmail(email); + otp =yopMailHomePage.getOtp(); + yopMailHomePage.switchBackToOriginalWindow(); + return otp; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify (.*) in selected in dropdown and on property detail page is same + +### Output: +public void ThenAfterFetchingDataFromDataFileIVerifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String file,String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + propertyDetailsPage.varifyBreadcrumbIsPresent(value); + propertyDetailsPage.varifyPropertysSelectedOnDropdownAndPageAreSame(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Click selanjutnya button + +### Output: +public void clickSelanjutnyaButton() { + loginPage.clickSelanjutnyaButton(); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?see default text (.*) in email or mobile textfield + +### Output: +public void validateDefaultTextEmailOrMobileTextfield(String dontFlag, String value) { + loginFirstScreenPage.validateDefaultTextEmailOrMobileTextfield(dontFlag,value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I searched for (.*) user + +### Output: +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); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to Admin Dashboard + +### Output: +public void landAdminDashboard() { + adminDashboard.shouldBeVisible(); + waitFor(5000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I edit Customer Name as (.*) and save + +### Output: +public void CustomerName(String name) { + adminLoginPage.enterCustomerName(name); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the correct OTP in Login screen( but the old one| but the expired one)? + +### Output: +public void enterCorrectlyFetchedOtp(String oldOrNew) { + loginSecondScreenPage.enterOtp(otp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +validate number of users asign to selected location or group + +### Output: +public int getNumOfUsers() { + String users=numOfUsers.getText(); + users=users.substring(users.length()-2, users.length()); + int NumberOfUsers=Integer.parseInt(users); + return NumberOfUsers; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify delete user pop up should open + +### Output: +public void ThenIVerifyDeleteUserPopUpShouldOpen() + { + userManagementPage.varifyDeleteUserPopupOpened(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should see an error + +### Output: +public void iShouldSeeAnError() { + Assert.assertEquals(productPage.getValidationMsg(), ""Value must be greater than or equal to 1.""); + Assert.fail(""Failing this step intentionally to check the screenshot attached int the Report""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?see textfield Referral code in Onboarding screen + +### Output: +public void validateTextfieldReferralCode(String dontFlag) throws Exception { + expandingFarmsScreenPage.validateTextfieldReferralCode(dontFlag); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Send me a code + +### Output: +public void clickSendMeACode() { + waitFor(sendMeACodeButton); + clickOn(sendMeACodeButton); + waitFor(10000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +the selected quantity is {int} + +### Output: +public void enterQuantity(int quantity) { + clearAndSendKeys(quantityInputFld, Integer.toString(quantity)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that (project|location) dropdown list (projects|locations) in dashboard + +### Output: +public void verifyLeftPannelProjects(String locationOrProjectDropdown, String projectsOrLocations) { + dashboardPage.verifyLeftPannelProjectsOrLocations(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate user is deleted + +### Output: +public void GivenIValidateUserIsDeleted() + { + userManagementPage.verifyUserIsDeleted(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I choose (.*) from Utility provider dropdown + +### Output: +public void selectUtilityProvider(String file,String utilityProvider) throws FileNotFoundException, IOException { + if((file!=null) && (file.contains(""data file""))) + utilityProvider=commonPage.fetchDataFromDataProperties(utilityProvider); + checkAvailabilityScreenPage.selectUtilityProvider(utilityProvider); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to Admin Dashboard + +### Output: +public void landAdminDashboard(){ + adminLoginPage.landAdminDashboard(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I select (.*) select a location dropdown + +### Output: +public void ThenAfterFetchingDataFromDataFileISelectPropertyNameselectALocationDropdown(String file,String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + propertyDetailsPage.clickOnSelectAProperty(); + propertyDetailsPage.selectProjectFromDropdown(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on continue button in Signup Screen-1 + +### Output: +public void clickOnContinue(){ + clickOn(continue_btn); + waitABit(8000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify Project list for (Carbon|Billing + +### Output: +public void verifyCarbon_Billing_IndividualProjects(String value) { + dashboardPage.verifyCarbon_Billing_IndividualProjects(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify correct (.*) assign to (.* + +### Output: +public void ThenAfterFetchingDataFromDataFileIVerifyCorectProjectIdsAssignToLocationId(String file, String keyProjectID,String keyLocationId) throws FileNotFoundException, IOException + { + String valueProjectID=""""; + String valueLocationId=""""; + if((file!=null) && (file.contains(""data file""))) { + for(int index=1; index<3; index++) { + valueProjectID=commonPage.fetchDataFromDataProperties(keyProjectID+index); + valueLocationId=commonPage.fetchDataFromDataProperties(keyLocationId+index); + + int num=index-1; + String apiResponseProjectMap=response.jsonPath().get(""projectMap[""+num+""].projectId""); + String apiResponseTenantLocationMap=response.jsonPath().get(""tenantLocationMap[""+num+""].locationId""); + + Assert.assertTrue(valueProjectID.equals(apiResponseProjectMap)); + Assert.assertTrue(valueLocationId.equals(apiResponseTenantLocationMap)); + } + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in Signup mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?give consent to send me a Code to my mobile number + +### Output: +public void giveOTPConsentForMobile() { + mobileOtpConsentCheckbox=getDriver().findElement(By.xpath(""//input[@type='checkbox']"")); + JavascriptExecutor js=(JavascriptExecutor)getDriver(); + if(!mobileOtpConsentCheckbox.isSelected()) + js.executeScript(""arguments[0].click();"", mobileOtpConsentCheckbox); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on question mark on total net metering panel + +### Output: +public void IClickOnQuestionMarkOnTotalNetMeteringPanel() + { + propertyDetailsPage.clickOnToolTip(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I use {word} arrow to change the quantity + +### Output: +public void iUseDirectionArrowToChangeTheQuantity(String direction) { + context.product = new Product(); + context.product.setQuantity(productPage.updateQuantityUsingArrows(direction)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify groups pop up should open + +### Output: +public void IVerifyGroupsPopUpShouldOpen() + { + userManagementPage.varifyGroupsPopupOpened(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I edit firstname and last name as (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I should get a masking on (email|mobile number) (.* + +### Output: +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); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I have {int} {product} in the cart + +### Output: +public void iHaveInTheCart(int quantity, Product product) throws Exception { +// storePage.addToCart(""Blue Shoes""); +// CartApi cartApi = new CartApi(context.cookies.get()); + CartApi cartApi = new CartApi(context.cookies.getCookies()); + product = context.productList.getProductByName(product.getName()); + cartApi.addToCart(product.getId(), quantity); + // context.cookies.set(cartApi.getCookies()); + context.cookies.setCookies(cartApi.getCookies()); + context.cookies.injectCookiesToBrowser(context.driver); + context.product = product; + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter (.*) in Referral code textfield in Onboarding screen + +### Output: +public void enterValueInReferralCode(String file, String value) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + expandingFarmsScreenPage.enterReferralCode(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I validate group (.*) is created or edited + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I am on Onboarding screen with (.*) referral code + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I navigate to property detail page + +### Output: +public void ThenINavigateToPropertyDetailPage() + { + propertyDetailsPage.varifyBreadcrumbIsPresent(""Dashboard""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify tooltip text + +### Output: +public void ThenIVerifyTooltipTextIs() + { + String expectedTotalNetMeteringToolTipText=LoginStaticTextsEnum.TOTALNETMETERINGTOOLTIPTEXT.getValue(); + String actualTotalNetMeteringToolTipText=propertyDetailsPage.getToolTipText(); + Assert.assertTrue(expectedTotalNetMeteringToolTipText.equals(actualTotalNetMeteringToolTipText)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the incorrect OTP (.*) in Signup screen + +### Output: +public void enterIncorrectOTP(String incorrectOtp) { + signUpSecondScreenPage.enterOtp(incorrectOtp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield + +### Output: +public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + loginFirstScreenPage.validateErrorMessage(expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Go Back + +### Output: +public void goBack() { + goBack.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on add new user button to create user + +### Output: +public void clickOnAddNewUser() { + addNewUser.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I close the browser + +### Output: +public void closeBrowser(){ + getDriver().close(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I verify (.*) rides saved with (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Go Back in Signup + +### Output: +public void goBack() { + signUpSecondScreenPage.goBack(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Request Information button on \'Help And Support\' screen + +### Output: +public void clickRequestInformationButton() { + clickOn(requestInformationButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I fetch value of (.*) from response of (.*) API and write to data file + +### Output: +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!!""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield in Signup + +### Output: +public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + signUpFirstPage.validateErrorMessage(expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on continue button in Signup Screen-2 + +### Output: +public void clickOnContinue(){ + clickOn(continue_btn); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on the (Carbon|Billing|Data Health|Income|Documents|\'Help And Support\') button in left panel of dashboard + +### Output: +public void clickCarbon() { + waitFor(carbonButton); + clickOn(carbonButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields in Signup + +### Output: +public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception { + switch(expectedError) { + case ""INVALID_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); + break; + case ""INVALID_EMAIL_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); + break; + case ""INVALID_EMAIL_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_MOBILE_ERROR.getValue(); + break; + case ""EMAIL_MAX_50_CHARS"": + expectedError=SupReferralLoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); + break; + case ""INCORRECT_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_OTP.getValue(); + break; + case ""INCOMPLETE_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); + break; + case ""INVALID_SESSION"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_SESSION.getValue(); + break; + case ""INCORRECT_PASSWORD"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); + break; + case ""REFERRAL_CODE_NOT_EXIST"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_NOT_EXIST.getValue(); + break; + case ""REFERRAL_CODE_SPECIAL_CHARACTER"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_SPECIAL_CHARACTER.getValue(); + break; + case ""USER_DISABLED"": + expectedError=SupReferralLoginErrorMessagesEnum.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I edit Customer Name as (.*) and save + +### Output: +public void enterCustomerName(String name) { + typeInto(name_txt, name); + waitFor(5000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields in Signup + +### Output: +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); + } + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify delete group pop up should open + +### Output: +public void IVerifyDeleteGroupPopUpShouldOpen() + { + userManagementPage.varifyDeleteGroupPopupOpened(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) bill document + +### Output: +public void uploadBillDocument(String file, String value) throws AWTException, IOException { + if ((file != null) && (file.contains(""data file""))) + value = commonPage.fetchDataFromDataProperties(value); + utilityScreenPage.uploadDocument(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see secondary static text (.*) in Login screen + +### Output: +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"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN1_SECONDARY_STATIC_TEXT_HEADING.getValue(); + break; + case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue(); + break; + case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"": + expectedStaticText=LoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I add API params with parameter (.*) as (.* + +### Output: +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().minusMonths(1).withDayOfMonth(1); + Date date=fromDate.toDate(); + SimpleDateFormat formatter = new SimpleDateFormat(""yyyy-MM-dd""); + String fromdate= formatter.format(date); + paramsMap.put(paramKey, fromdate); + paramValue=fromdate; + } + else if(paramKey.equals(""toDate"")) { + LocalDate toDate=LocalDate.now().withDayOfMonth(1).minusDays(1); + Date date=toDate.toDate(); + SimpleDateFormat df=new SimpleDateFormat(""YYYY""); + SimpleDateFormat formatter = new SimpleDateFormat(""yyyy-MM-dd""); + String todate= formatter.format(date); + paramsMap.put(paramKey, todate); + paramValue=todate; + } + else + paramsMap.put(paramKey, paramValue); + System.out.println(""Param ""+paramKey+"" picked as ""+paramValue); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I choose (.*) from Utility provider dropdown + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I verify (.*) sunshine factor with (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter group name (.*) in group pop up + +### Output: +public void enterEmailOrMobile(String file, String value) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + userManagementPage.enterGroupName(value+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Home page without authorizations + +### Output: +public void homePageWithoutAuthorizations() { + Assert.assertTrue(homePage.defaultHomePageIsDisplayed()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on group (.* + +### Output: +public void ThenIClickOnGroupGroupThreeGroupThreeGroupThree(String file,String value) throws FileNotFoundException, IOException + { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + userManagementPage.clickOnGroup(value+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter value (.*) in description textarea + +### Output: +public void enterDescription(String value) { + helpAndSupportPage.enterEmailContent(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +the order should be placed successfully + +### Output: +public void theOrderShouldBePlacedSuccessfully() { + Assert.assertEquals(""Thank you. Your order has been received."", checkoutPage.getNotice()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Search product link with {string} data is displayed + +### Output: +public String getSearchProductLink() { + searchProductLink.isDisplayed(); + return searchProductLink.getText(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I clicks on User Management tab + +### Output: +public void clickOnUserManagementTab() { + userManagementTab.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for groupname + +### Output: +public void ThenIGetErrorMessageForGroupName(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Group Name"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate that name, role, last active, member since & mapped locations columns should be visible + +### Output: +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()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on dashboard + +### Output: +public void clickBreadcrumbLink(String BreadcrumbName) { + String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); + WebElement BreadcrumbEle=getDriver().findElement(By.xpath(project)); + waitFor(BreadcrumbEle); + clickOn(BreadcrumbEle); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select (.*) location from the list + +### Output: +public void clickOnMappedLocations() { + MappedLocations.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) Utility bill document + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter all the details for registering in Onboarding + +### Output: +public void enterRegistrationDetailsForOnboarding(String file, DataTable dataTable) throws Throwable { + String email,mobNum; + List data = dataTable.asList(String.class); + if((file!=null)&&(file.contains(""data file""))) { + email=commonPage.fetchDataFromDataProperties(data.get(2));; + mobNum=commonPage.fetchDataFromDataProperties(data.get(3));; + } + else { + email=data.get(2); + mobNum=data.get(3); + } + expandingFarmsScreenPage.enterFirstName(data.get(0)); + expandingFarmsScreenPage.enterLastName(data.get(1)); + expandingFarmsScreenPage.enterEmail(email); + expandingFarmsScreenPage.enterMobileNumber(mobNum); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add a {product} to the cart + +### Output: +public void iAddAToTheCart(Product product) { + storePage.addToCart(product.getName()); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose Join Community Solar + +### Output: +public void goGreen() { + waitFor(goGreenButton); + clickOn(goGreenButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare headers for (.*) API + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select the location or group number (.*) from the list + +### Output: +public void selectLocationFromThedropdown(int locationNum) { + CommonPage commonPage = new CommonPage(); + commonPage.waitForSometime(5*1000); + List options=getDriver().findElements(By.xpath(""//li[@role='menuitem']"")); + options.get(locationNum).click(); + Actions action = new Actions(getDriver()); + action.sendKeys(Keys.ESCAPE).build().perform(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click Send me a Code button + +### Output: +public void clickLoginSendMeACode() { + waitFor(sendMeACodeButton); + clickOn(sendMeACodeButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I agree to opt for the solar power in Benefit Onboarding screen + +### Output: +public void clickYesIAmInButton() { + waitFor(yesIAmInButton); + clickOn(yesIAmInButton); + waitABit(5000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for duplicate user + +### Output: +public void validateDuplicateUser() { + Assert.assertTrue(userAlreadyExists.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter all the details for signing up in Signup Screen-1 + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter value (.*) in description textarea + +### Output: +public void enterEmailContent(String value) { + typeInto(descriptionTextarea,value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Continue button on success message + +### Output: +public void clickOnContinueButton() { + WebDriverWait wait=new WebDriverWait(getDriver(),30); + wait.until(ExpectedConditions.elementToBeClickable(continueButton)); + continueButton.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I enter first name (.*), last name, phone number, email id + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (.*) page + +### Output: +public void changePage(String page) { + if(page.contains(""Next"") & nextPage.isEnabled()) + clickOn(nextPage); + if(page.contains(""Last"") & lastPage.isEnabled()) + clickOn(lastPage); + if(page.contains(""Previous"") & previousPage.isEnabled()) + clickOn(previousPage); + if(page.contains(""First"") & firstPage.isEnabled()) + clickOn(firstPage); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I validate that Email is successfully sent + +### Output: +public void validateEmailSent() { + helpAndSupportPage.validateEmailSentSuccessfully(); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in email or mobile textfield + +### Output: +public void enterEmailOrMobile(String file, String value) throws Throwable { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + loginFirstScreenPage.enterLoginEmailOrMobile(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter group name (.*) to validate error messages + +### Output: +public void enterGroupName(String groupname) { + groupName.clear(); + typeInto(groupName,groupname); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I select the role (.* + +### Output: +public void ThenISelecTheRole(int num) throws InterruptedException + { + userManagementPage.selectRole(num); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I enter first name (.*), last name, phone number, email id and role in edit user popup + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on see details + +### Output: +public void clickOnSeeDetails() { + JavascriptExecutor jse = (JavascriptExecutor)getDriver();; + jse.executeScript(""window.scrollBy(0,500)""); + if(seeDetails.isVisible()) { + clickOn(seeDetails); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose to Resend OTP + +### Output: +public void resendOtp() { + loginSecondScreenPage.resendOtp(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield + +### Output: +public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException { + if((file!=null)&&(file.contains(""data file""))) + value=commonPage.fetchDataFromDataProperties(value); + loginFirstScreenPage.validatePrepopulatedEmailOrMobileTextfield(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I agree and click on Subscriber Agreement button on Payment screen + +### Output: +public void clickSubsciberAgreementButton() { + waitFor(subscriberAgreementButton); + clickOn(subscriberAgreementButton); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click outside + +### Output: +public void clickOutside() { + outside.click(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on add new user button to create user + +### Output: +public void ThenIClickOnAddNewUserButtonToCreateUser() + { + userManagementPage.clickOnAddNewUser(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Utility provider dropdown does not appear + +### Output: +public void validateUltilityProviderNotPresent() { + checkAvailabilityScreenPage.validateUltilityProviderNotPresent(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify property name (.*) in selected in dropdown and on property detail page is same + +### Output: +public void ThenIVarifyPropertyNameInSelectedInDropdownAndOnPropertyDetailPageIsSame(String propertyName) + { + propertyDetailsPage.varifyPropertysSelectedOnDropdownAndPageAreSame(propertyName); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter the incorrect OTP (.*) in Login screen + +### Output: +public void enterOtp(String correctOtp) { + waitFor(otpTextFields); + otpTextFields.clear(); + otpTextFields.clear(); + otpTextFields.clear(); + otpTextFields.clear(); + otpTextFields.clear(); + otpTextFields.clear(); + waitABit(200); + typeInto(otpTextFields,correctOtp); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter all the details for registering in Onboarding + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I choose (.*) from Utility provider dropdown + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for referral code textfield + +### Output: +public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + expandingFarmsScreenPage.validateErrorMessage(expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter (.*) usage in Allocated Usage + +### Output: +public void allocatedUsage(String usage) + { + adminLoginPage.enterAllocatedUsage(usage); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for mapped locations + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) document for LMI document + +### Output: +public void uploadLmiDocument(String file, String value) throws AWTException, IOException { + if ((file != null) && (file.contains(""data file""))) + value = commonPage.fetchDataFromDataProperties(value); + lmiScreenPage.uploadLmiDocument(value); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to Login screen + +### Output: +public void validateLandedOnLoginScreen() throws Exception { + loginFirstScreenPage.validateLandedOnLoginScreen(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I click on project (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file)? I verify correct (.*) assign to (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for select user role + +### Output: +public void ThenIGetErrorMessageForSelectUserRole(String expectedError) throws Exception + { + expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError); + userManagementPage.validateErrorMessage(""Select Role"", expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +the order should be placed successfully + +### Output: +public String getNotice() { + return getElementText(noticeTxt); + + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield + +### Output: +public void validateErrorForEmailOrMobileTextfield(String expectedError) throws Exception { + expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError); + loginFirstScreenPage.validateErrorMessage(expectedError); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I edit group name to (.* + +### Output: +public void ThenIEditGroupNameToAutomationGroupEdited(String groupName) + { + userManagementPage.enterGroupName(groupName+generatedString); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API (for customer id \\d+ )?with headers and payload + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I check availability in zip code (.* + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify that logged in user is at top with mentioned and does not have delete and edit icon + +### Output: +public void varifyLoggedInUserShouldOnTOpOfGrid() { + String user=loggedInUser.getText(); + Assert.assertTrue(user.contains(""You"")); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should successfully land to dashboard + +### Output: +public void reachedDashboard(){ + dashboardPage.reachedDashboard(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Utility provider dropdown does not appear + +### Output: +public void validateUltilityProviderNotPresent() { + utilityProviderDropdown.shouldNotBeCurrentlyVisible(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on continue button in Signup Screen-1 + +### Output: +public void clickOnContinueButton(){ + signUpFirstPage.clickOnContinue(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I add {int} quantity to the cart + +### Output: +public void iAddToTheCart(int quantity) { + productPage.enterQuantity(quantity); + productPage.addToCart(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I see empty OTP textfields + +### Output: +public void validateEmptyOtpTextfields() { + loginSecondScreenPage.validateOtpIsEmpty(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Delete User button on delete user pop up + +### Output: +public void ThenIClickOnDeleteUserButtonOnDeleteUserPopUp() throws InterruptedException + { + userManagementPage.clickOnDeleteUserButton(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I close the browser + +### Output: +public void closeBrowser(){ + browserControlPage.closeBrowser(); + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on user info + +### Output: +public void ThenIClickOnUserInfo() + { + userManagementPage.clickOnUser(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I (dont )?get error message (.*) for OTP textfields in Signup + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Search product with {string} keyword + +### Output: +public void searchProductData(String product) { + + setSearchInput(product); + searchInput.sendKeys(Keys.ENTER); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for email or mobile textfield in Signup + +### Output: +public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception { + switch(expectedError) { + case ""INVALID_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue(); + break; + case ""INVALID_EMAIL_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue(); + break; + case ""INVALID_EMAIL_MOBILE_ERROR"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_EMAIL_MOBILE_ERROR.getValue(); + break; + case ""EMAIL_MAX_50_CHARS"": + expectedError=SupReferralLoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue(); + break; + case ""INCORRECT_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_OTP.getValue(); + break; + case ""INCOMPLETE_OTP"": + expectedError=SupReferralLoginErrorMessagesEnum.INCOMPLETE_OTP.getValue(); + break; + case ""INVALID_SESSION"": + expectedError=SupReferralLoginErrorMessagesEnum.INVALID_SESSION.getValue(); + break; + case ""INCORRECT_PASSWORD"": + expectedError=SupReferralLoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue(); + break; + case ""REFERRAL_CODE_NOT_EXIST"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_NOT_EXIST.getValue(); + break; + case ""REFERRAL_CODE_SPECIAL_CHARACTER"": + expectedError=OnboardingErrorMessagesEnum.REFERRAL_CODE_SPECIAL_CHARACTER.getValue(); + break; + case ""USER_DISABLED"": + expectedError=SupReferralLoginErrorMessagesEnum.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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Login form in login page + +### Output: +public void goToLoginPage() { + Assert.assertTrue(homePage.defaultHomePageIsDisplayed()); + homePage.clickLoginButton(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +This is for invalid locators + +### Output: +public void getInvalidLocators() { + invalidLocators.isDisplayed(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I choose (.*) from Utility provider dropdown + +### Output: +public void selectUtilityProvider(String file,String utilityProvider) throws FileNotFoundException, IOException { + if((file!=null) && (file.contains(""data file""))) + utilityProvider=commonPage.fetchDataFromDataProperties(utilityProvider); + dataHealthPagePage.selectUtilityProvider(utilityProvider); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API and (.*) for customer id (\\d+) with headers + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I should be successful in creating a new account (.* + +### Output: +public boolean isUserLoggedByName(String expectedName){ + return (hiUserName_lbl.getText()).contains(expectedName)?true:false; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) bill document + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on Login screen + +### Output: +public void submit() { + loginSecondScreenPage.submitLogin(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click the (.*) customer on Customer grid + +### Output: +public void clickCustomerGrid(String value) { + waitFor(search_entry); + String actualColumnButton=String.format(parameterizedColumnButton, value); + clickOn(getDriver().findElement(By.xpath(actualColumnButton))); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I fetch OTP of Email (.* + +### Output: +public void getEmailOtp(String file, String email) throws InterruptedException, FileNotFoundException, IOException { + yopMailHomePage.openNewTabAndSwitch(); + yopMailHomePage.getDriver().get(""https://yopmail.com/en/""); + if((file!=null) && (file.contains(""data file""))) + email=commonPage.fetchDataFromDataProperties(email); + yopMailHomePage.enterEmail(email); + otp =yopMailHomePage.getOtp(); + yopMailHomePage.switchBackToOriginalWindow(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on (tenant|landlord) tab of side navigation bar + +### Output: +public void clickTenantLandlordTab(String tenantOrLandlordTab) { + if(tenantOrLandlordTab.toLowerCase().contains(""tenant"")) { + dashboardPage.clickTenantTab(); + }else if(tenantOrLandlordTab.toLowerCase().contains(""landlord"")) { + dashboardPage.clickLandlordTab(); + } + } +}" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify title of (.* + +### Output: +public void ThenIVarifyTitleOfPropertDetailPageIsB2B_Location_Details(String pageName) throws Exception + { + String expectedTitle=propertyDetailsPage.fetchPageTitlesfromEnum(pageName); + String actualTitle=propertyDetailsPage.getDriver().getTitle(); + Assert.assertTrue(expectedTitle.equals(actualTitle)); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I choose Join Community Solar + +### Output: +public void chooseGoGreen() { + onboardingFirstScreenPage.goGreen(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +Product list is displayed + +### Output: +public boolean searchResultPageIsDisplayed() { + Wait.untilPageReadyState(webDriver, 5L); + resultTitle.isDisplayed(); + urutkanOptionButton.isDisplayed(); + listViewButton.isDisplayed(); + gridViewButton.isDisplayed(); + return true; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on user info + +### Output: +public void clickOnUser() { + clickOn(user); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I set request specification with the (.*) API (for customer id \\d+ )?with headers and payload + +### Output: +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""); + if(index>=0) + apiURL=apiURL.replace(""1006"",customerId); + + RestAssured.baseURI=apiURL; + RestAssured.useRelaxedHTTPSValidation(); + httpRequest = RestAssured.given().headers(headersMap).body(payload.getBytes()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I enter firstname (.*), lastname (.*) mobile number (.*) and email (.* + +### Output: +public void ThenIEnterFirstnameAutomationLastnameTestOneMobileNumberAndEmailBbautomationtestYopmail_Com(String fname, String lname, String mobileNum, String email) + { + userManagementPage.enterFirstName(fname); + userManagementPage.enterLastName(lname); + userManagementPage.enterEmail(email); + userManagementPage.enterMobileNumber(mobileNum); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I enter value (.*) in email or mobile textfield + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +After fetching data from data file )?I upload (.*) LMI Bill Document + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare API headers( and pass authkey)? + +### Output: +public void prepareHeadersForAPIsAfterLogin(String passAuthkey) throws IOException { + headersMap=new HashMap(); + if((passAuthkey!=null)&&(passAuthkey.contains(""auth""))) + headersMap.put(""Authorization"",authKey); + headersMap.put(""x-api-key"",commonPage.fetchDataFromDataProperties(""x-api-key"")); + headersMap.put(""Accept"", ""application/json, text/plain, */*""); + headersMap.put(""Accept-Encoding"",""gzip, deflate, br""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I get error message (.*) for groupname + +### Output: +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""); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify (.*) user is edited + +### Output: +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(elem.isDisplayed()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I verify delete group pop up should open + +### Output: +public void varifyDeleteGroupPopupOpened() { + Assert.assertTrue(deleteGroupPopup.isVisible()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I provide billing details + +### Output: +public CheckoutPage setBillingDetails(BillingDetails billingDetails) { + return enterBillingFirstName(billingDetails.getBillingFirstName()) + .enterBillingLastName(billingDetails.getBillingLastName()) + .enterBillingAddressLineOne(billingDetails.getBillingAddressOne()) + .enterBillingCity(billingDetails.getBillingCity()) + .selectBillingState(billingDetails.getBillingStateName()) + .enterBillingZip(billingDetails.getBillingZip()) + .enterBillingEmail(billingDetails.getBillingEmail()); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Delete User button on delete user pop up + +### Output: +public void clickOnDeleteUserButton() throws InterruptedException { + deleteUserButton.click(); + Thread.sleep(2000); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I prepare API headers( and pass authkey)? + +### Output: +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; + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I click on Submit button on create group pop up + +### Output: +public void ThenIClickOnSubmitButtonOnCreateGroupPopUp() + { + userManagementPage.clickOnSubmitCreateGroupButton(); + }" +"### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task: + +### Task: Write automation script for UI Testing that contains only a page object definition function, written using Cucumber and Selenium frameworks, for the following input: + +### Input: +I navigate to property detail page + +### Output: +public void varifyBreadcrumbIsPresent(String BreadcrumbName) { + String project=String.format(parameterizedBreadcrumbName, BreadcrumbName); + WebElement BreadcrumbEle=getDriver().findElement(By.xpath(project)); + waitFor(BreadcrumbEle); + Assert.isTrue(BreadcrumbEle.isDisplayed()); + }"