shyam-incedoinc commited on
Commit
b5e30a1
1 Parent(s): c204c1f

Upload valid.csv with huggingface_hub

Browse files
Files changed (1) hide show
  1. valid.csv +1326 -0
valid.csv ADDED
@@ -0,0 +1,1326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ text
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:
3
+
4
+ ### 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:
5
+
6
+ ### Input:
7
+ I enter the correct OTP in Login screen( but the old one| but the expired one)?
8
+
9
+ ### Output:
10
+ public void enterOtp(String correctOtp) {
11
+ waitFor(otpTextFields);
12
+ otpTextFields.clear();
13
+ otpTextFields.clear();
14
+ otpTextFields.clear();
15
+ otpTextFields.clear();
16
+ otpTextFields.clear();
17
+ otpTextFields.clear();
18
+ waitABit(200);
19
+ typeInto(otpTextFields,correctOtp);
20
+ }"
21
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
22
+
23
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
24
+
25
+ ### Input:
26
+ Product list is displayed
27
+
28
+ ### Output:
29
+ public void productListIsDisplayed() {
30
+ Assert.assertTrue(productListPage.searchResultPageIsDisplayed());
31
+
32
+ String actualResultTitle = productListPage.getResultTitle().toLowerCase();
33
+ String expectedProductName = testContext.scenarioContext.getContext(Context.EXPECTED_DATA).toString().toLowerCase();
34
+
35
+ Assert.assertEquals(expectedProductName, actualResultTitle);
36
+
37
+ int totalProduct = Integer.parseInt(productListPage.getProductAmount());
38
+
39
+ for (int i = 0; i < totalProduct; i++) {
40
+ String actualProductTitle = productListPage.getAllProductTitle(i).toLowerCase();
41
+
42
+ Assert.assertTrue(testContext.scenarioContext.isContains(Context.EXPECTED_DATA)); //Context assertion
43
+ Assert.assertTrue(actualProductTitle.contains(expectedProductName)); //Common assertion
44
+ }
45
+ }"
46
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
47
+
48
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
49
+
50
+ ### Input:
51
+ I should be successful in creating a new account (.*
52
+
53
+ ### Output:
54
+ public void isSuccessfullySignedUp(String userName){
55
+ assert dashboardPage.isUserLoggedByName(userName);
56
+ }"
57
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
58
+
59
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
60
+
61
+ ### Input:
62
+ After fetching data from data file )?I should get a masking on (email|mobile number) (.*
63
+
64
+ ### Output:
65
+ public void maskedEmailOrMobileNumber(String file, String emailOrMobile, String value) throws FileNotFoundException, IOException {
66
+ if((file!=null) && (file.contains(""data file""))) {
67
+ value=commonPage.fetchDataFromDataProperties(value);
68
+ }
69
+ if(emailOrMobile.equalsIgnoreCase(""email""))
70
+ loginSecondScreenPage.validateMaskingInEmail(value);
71
+ else if(emailOrMobile.equalsIgnoreCase(""mobile number""))
72
+ loginSecondScreenPage.validateMaskingInMobile(value);
73
+ }
74
+ }"
75
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
76
+
77
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
78
+
79
+ ### Input:
80
+ I (dont )?get error message (.*) for OTP textfields in Signup
81
+
82
+ ### Output:
83
+ public void validateErrorMeesage(String dontFlag, String expectedError) throws Exception {
84
+ if((dontFlag!=null)&&(dontFlag.contains(""dont""))) {
85
+ expectedError=null;
86
+ signUpSecondScreenPage.validateNoErrorMessage();
87
+ }
88
+ else {
89
+ expectedError=commonPage.fetchErrorMessageConstantsfromEnum(expectedError);
90
+ signUpSecondScreenPage.validateErrorMessage(expectedError);
91
+ }
92
+ }"
93
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
94
+
95
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
96
+
97
+ ### Input:
98
+ After fetching data from data file )?I see prepopulated value (.*) in email or mobile textfield in Signup
99
+
100
+ ### Output:
101
+ public void validatePrepopulatedEmailOrMobileTextfield(String file, String value) throws FileNotFoundException, IOException {
102
+ if((file!=null)&&(file.contains(""data file"")))
103
+ value=commonPage.fetchDataFromDataProperties(value);
104
+ signUpFirstPage.validatePrepopulatedEmailOrMobileTextfield(value);
105
+ }
106
+
107
+ }"
108
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
109
+
110
+ ### 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:
111
+
112
+ ### Input:
113
+ I add it again
114
+
115
+ ### Output:
116
+ public void addToCart(String productName) {
117
+ String raw = ""a[aria-label='Add “"" + productName + ""” to your cart']"";
118
+ byte[] bytes = raw.getBytes(StandardCharsets.UTF_8);
119
+ String utf8Encoded = new String(bytes, StandardCharsets.UTF_8);
120
+ By addToCartBtn = By.cssSelector(utf8Encoded);
121
+ waitForElementVisibility(titleTxt);
122
+ click(addToCartBtn);
123
+ click(viewCartLink);
124
+ }"
125
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
126
+
127
+ ### 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:
128
+
129
+ ### Input:
130
+ I provide the Utility Details
131
+
132
+ ### Output:
133
+ public void provideUtilityDetails() {
134
+ waitABit(5000);
135
+ clickOn(signinButton);
136
+ getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='MuiDialogContent-root']//iframe"")));
137
+ waitABit(5000);
138
+ // typeInto(customerEmailTextfield,""[email protected]"");
139
+ typeInto(uesrNameTextfield,""UAPI_TEST_residential"");
140
+ typeInto(passwordTextfield,""TEST"");
141
+ typeInto(digitalSignatureTextfield,""Siddharth"");
142
+ waitABit(5000);
143
+ waitFor(authorizeButton);
144
+ clickOn(authorizeButton);
145
+ waitABit(35000);
146
+ getDriver().switchTo().defaultContent();
147
+ waitFor(iDontQualifyButton);
148
+ }"
149
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
150
+
151
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
152
+
153
+ ### Input:
154
+ I verify fuel details on property overview page and dataHealth dashboard Api are same
155
+
156
+ ### Output:
157
+ public void GivenIVerifyFuelDetailsOnPropertyOverviewPageAndDataHealthDashboardApiAreSame() throws Exception
158
+ {
159
+
160
+ String fuelType=propertyDetailsPage.getFuelUsageText();
161
+ System.out.println(fuelType);
162
+ HashMap<String, String> fuelDetails=response.jsonPath().get(""dashboardData[0].fuelDetails"");
163
+ if(fuelDetails.containsKey(""fuelOilConsumption"") && fuelDetails.containsKey(""naturalGasConsumption"")) {
164
+ Assert.assertTrue(fuelType.contains(""Fuel Oil"") && fuelType.contains(""Natural Gas""));
165
+ }else if(fuelDetails.containsKey(""fuelOilConsumption"")) {
166
+ Assert.assertTrue(fuelType.contains(""Fuel Oil""));
167
+ }else if(fuelDetails.containsKey(""naturalGasConsumption"")) {
168
+ Assert.assertTrue(fuelType.contains(""Natural Gas""));
169
+ }else {
170
+ Assert.assertTrue(fuelType.contains(""--""));
171
+ }
172
+
173
+ }"
174
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
175
+
176
+ ### 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:
177
+
178
+ ### Input:
179
+ I choose to Resend OTP in Signup
180
+
181
+ ### Output:
182
+ public void resendOtp() {
183
+ clickOn(resendButton);
184
+ }"
185
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
186
+
187
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
188
+
189
+ ### Input:
190
+ I assign (.*) Project
191
+
192
+ ### Output:
193
+ public void Project(String projectName)
194
+ {
195
+ adminLoginPage.assignProject(projectName);
196
+ }"
197
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
198
+
199
+ ### 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:
200
+
201
+ ### Input:
202
+ Login form in login page
203
+
204
+ ### Output:
205
+ public boolean defaultHomePageIsDisplayed() {
206
+ headerLogoButton.isDisplayed();
207
+ searchInput.isDisplayed();
208
+ cartButton.isDisplayed();
209
+ bhinnekaCopyrightFooter.isDisplayed();
210
+ return true;
211
+ }"
212
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
213
+
214
+ ### 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:
215
+
216
+ ### Input:
217
+ I get error message (.*) for select user role
218
+
219
+ ### Output:
220
+ public String fetchUserManagementErrorMessageConstantsfromEnum(String expectedError) throws Exception {
221
+ switch(expectedError) {
222
+ case ""INVALID_FIRSTNAME_ERROR"":
223
+ expectedError=UserManagementErrorMessagesEnum.INVALID_FIRSTNAME_ERROR.getValue();
224
+ break;
225
+ case ""INVALID_LASSTNAME_ERROR"":
226
+ expectedError=UserManagementErrorMessagesEnum.INVALID_LASSTNAME_ERROR.getValue();
227
+ break;
228
+ case ""FIRSTNAME_NUMBER_SPECIAL_CHAR_ERROR"":
229
+ expectedError=UserManagementErrorMessagesEnum.FIRSTNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue();
230
+ break;
231
+ case ""LASTNAME_NUMBER_SPECIAL_CHAR_ERROR"":
232
+ expectedError=UserManagementErrorMessagesEnum.LASTNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue();
233
+ break;
234
+ case ""INVALID_MOBILE_ERROR"":
235
+ expectedError=UserManagementErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
236
+ break;
237
+ case ""MOBILE_START_ZERO_ERROR"":
238
+ expectedError=UserManagementErrorMessagesEnum.MOBILE_START_ZERO_ERROR.getValue();
239
+ break;
240
+ case ""INVALID_EMAIL_ERROR"":
241
+ expectedError=UserManagementErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue();
242
+ break;
243
+ case ""EMAIL_MAX_50_CHARS"":
244
+ expectedError=UserManagementErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue();
245
+ break;
246
+ case ""SELECT_ROLE_ERROR"":
247
+ expectedError=UserManagementErrorMessagesEnum.SELECT_ROLE_ERROR.getValue();
248
+ break;
249
+ case ""SELECT_MAPPED_LOCATIONS_ERROR"":
250
+ expectedError=UserManagementErrorMessagesEnum.SELECT_MAPPED_LOCATIONS_ERROR.getValue();
251
+ break;
252
+ case ""FIRSTNAME_MAX_30_CHARS"":
253
+ expectedError=UserManagementErrorMessagesEnum.FIRSTNAME_MAX_30_CHARS.getValue();
254
+ break;
255
+ case ""LASTNAME_MAX_25_CHARS"":
256
+ expectedError=UserManagementErrorMessagesEnum.LASTNAME_MAX_25_CHARS.getValue();
257
+ break;
258
+ case ""INVALID_GROUPNAME_ERROR"":
259
+ expectedError=UserManagementErrorMessagesEnum.INVALID_GROUPNAME_ERROR.getValue();
260
+ break;
261
+ case ""GROUPNAME_NUMBER_SPECIAL_CHAR_ERROR"":
262
+ expectedError=UserManagementErrorMessagesEnum.GROUPNAME_NUMBER_SPECIAL_CHAR_ERROR.getValue();
263
+ break;
264
+ case ""GROUPNAME_MAX_30_CHARS"":
265
+ expectedError=UserManagementErrorMessagesEnum.GROUPNAME_MAX_30_CHARS.getValue();
266
+ break;
267
+ default:
268
+ throw new Exception(""This Expected Error in feature file is not present in the list of expected errors in switch case or Enum file"");
269
+ }"
270
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
271
+
272
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
273
+
274
+ ### Input:
275
+ After fetching data from data file )?I enter value (.*) in Signup mobile textfield
276
+
277
+ ### Output:
278
+ public void enterEmailOrMobile(String file, String value) throws Throwable {
279
+ if((file!=null)&&(file.contains(""data file"")))
280
+ value=commonPage.fetchDataFromDataProperties(value);
281
+ signUpFirstPage.enterLoginMobile(value);
282
+ }"
283
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
284
+
285
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
286
+
287
+ ### Input:
288
+ After fetching data from data file )?I set request specification with the (.*) API with headers and payload
289
+
290
+ ### Output:
291
+ public void add_API_Payload(String file, String apiURL) throws IOException {
292
+
293
+ if((file!=null) && (file.contains(""data file""))) {
294
+ apiURL=apiURL+""APIURL"";
295
+ apiURL=commonPage.fetchDataFromDataProperties(apiURL);
296
+ }
297
+
298
+ // int index=apiURL.indexOf(""1006"");
299
+ // if(index>=0)
300
+ // apiURL=apiURL.replace(""1006"",customerId);
301
+
302
+ RestAssured.baseURI=apiURL;
303
+ RestAssured.useRelaxedHTTPSValidation();
304
+ httpRequest = RestAssured.given().headers(headersMap).body(payload.getBytes());
305
+ }"
306
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
307
+
308
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
309
+
310
+ ### Input:
311
+ I click on dashboard
312
+
313
+ ### Output:
314
+ public void ThenIClickOnDashboard()
315
+ {
316
+ propertyDetailsPage.clickBreadcrumbLink(""Dashboard"");
317
+ }
318
+
319
+
320
+
321
+ }"
322
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
323
+
324
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
325
+
326
+ ### Input:
327
+ I should successfully land to dashboard
328
+
329
+ ### Output:
330
+ public void landDashboard(){
331
+ dashboardPage.landDashboard();
332
+ }
333
+
334
+ }"
335
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
336
+
337
+ ### 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:
338
+
339
+ ### Input:
340
+ I click on Submit button on edit group pop up
341
+
342
+ ### Output:
343
+ public void clickOnSubmitEditGroupButton() {
344
+ clickOn(submitEditGroup);
345
+ }"
346
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
347
+
348
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
349
+
350
+ ### Input:
351
+ After fetching data from data file )?I verify (.*) rides saved with (.*
352
+
353
+ ### Output:
354
+ public void verifyRidesSaved(String file, String key,String totalRidesSaved) throws IOException {
355
+ if((file!=null) && (file.contains(""data file"")))
356
+ key=commonPage.fetchDataFromDataProperties(key);
357
+ String value=getJsonPath(response,key);
358
+ int l=value.length();
359
+ value=getJsonPath(response,key).substring(1, (l-1));
360
+ long sumOfAll=0;
361
+ int sumOfAllMinus=0;
362
+ int sumOfAllPlus=0;
363
+ int responseSize=0;
364
+ responseSize=response.body().jsonPath().getList(""cityPerformanceDataTOs"").size();
365
+ String[] arr = null;
366
+ arr=value.split("","");
367
+ for(int i=0;i<responseSize;i++){
368
+ System.out.println(""The amount value fetched is ""+arr[i]);
369
+ assertFalse(arr[i].startsWith(""-""));
370
+ if(arr[i].endsWith(""K""))
371
+ sumOfAll=sumOfAll+(Long.parseLong(arr[i].substring(0,arr[i].length()-1).trim()))*1000;
372
+ else if(arr[i].endsWith(""M""))
373
+ sumOfAll=sumOfAll+(Long.parseLong(arr[i].substring(0,arr[i].length()-1).trim()))*1000000;
374
+ else
375
+ sumOfAll=sumOfAll+Long.parseLong(arr[i].trim());
376
+ }
377
+ System.out.println(""The total amount is ""+sumOfAll);
378
+ String total=getJsonPath(response,totalRidesSaved);
379
+ String resultFlag;
380
+ if(sumOfAll>1000000){
381
+ sumOfAll=sumOfAll/1000000;
382
+ resultFlag=""M"";
383
+ assertTrue(total.endsWith(resultFlag));
384
+ total=total.substring(0, total.length()-1);
385
+ sumOfAllMinus=(int)sumOfAll-1;
386
+ sumOfAllPlus=(int)sumOfAll+1;
387
+ assertTrue((valueOf(sumOfAll).equals(total))||(valueOf(sumOfAllPlus).equals(total))||(valueOf(sumOfAllMinus).equals(total)));
388
+ }else if(sumOfAll>10000){
389
+ sumOfAll=sumOfAll/1000;
390
+ resultFlag=""K"";
391
+ sumOfAllMinus=(int)sumOfAll-1;
392
+ sumOfAllPlus=(int)sumOfAll+1;
393
+ assertTrue(total.endsWith(resultFlag));
394
+ total=total.substring(0, total.length()-1);
395
+ assertTrue((valueOf(sumOfAll).equals(total))||(valueOf(sumOfAllPlus).equals(total))||(valueOf(sumOfAllMinus).equals(total)));
396
+ }else {
397
+ assertEquals(valueOf(sumOfAll),total);
398
+ }
399
+ System.out.println(""Rides saved matched"");
400
+ }"
401
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
402
+
403
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
404
+
405
+ ### Input:
406
+ After fetching data from data file )?I validate that (.*) field is prepopulated with (.*) value
407
+
408
+ ### Output:
409
+ public void verifyFieldIsPrepopulatedWithValue(String file, String field, String value) throws FileNotFoundException, IOException {
410
+ if((file!=null)&&(file.contains(""data file""))) {
411
+ helpAndSupportPage.verifyFieldsPrepopulated(field, commonPage.fetchDataFromDataProperties(value));
412
+ }
413
+ else{
414
+ helpAndSupportPage.verifyFieldsPrepopulated(field, value);
415
+ }
416
+ }"
417
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
418
+
419
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
420
+
421
+ ### Input:
422
+ After fetching data from data file )?I enter value (.*) in email or mobile textfield
423
+
424
+ ### Output:
425
+ public void enterEmailOrMobile(String file, String value) throws Throwable {
426
+ if((file!=null)&&(file.contains(""data file"")))
427
+ value=commonPage.fetchDataFromDataProperties(value);
428
+ loginFirstScreenPage.enterLoginEmailOrMobile(value);
429
+ }"
430
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
431
+
432
+ ### 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:
433
+
434
+ ### Input:
435
+ I click on pencil icon to edit group
436
+
437
+ ### Output:
438
+ public void clickOnPencilIconToEditGroup() {
439
+ clickOn(editGroup);
440
+ }"
441
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
442
+
443
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
444
+
445
+ ### Input:
446
+ Go to cart page without authorizations
447
+
448
+ ### Output:
449
+ public void goToCartPageWithoutAuthorizations() {
450
+ homePage.clickCartButton();
451
+ Assert.assertTrue(loginPage.emailLoginPageIsDisplayed());
452
+ }
453
+ }"
454
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
455
+
456
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
457
+
458
+ ### Input:
459
+ I click on continue button in Signup Screen-2
460
+
461
+ ### Output:
462
+ public void ClickOnContinue() {
463
+ signUpSecondScreenPage.clickOnContinue();
464
+ }"
465
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
466
+
467
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
468
+
469
+ ### Input:
470
+ I click on Cancel button to close groups popup
471
+
472
+ ### Output:
473
+ public void ThenIClickOnCancelButtonToCloseGroupsPopup()
474
+ {
475
+ userManagementPage.clickCancelGroupspopup();
476
+ }"
477
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
478
+
479
+ ### 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:
480
+
481
+ ### Input:
482
+ I navigate to screen with static (text|subtext) (.*) in (Onboarding|Login|Signup) screen
483
+
484
+ ### Output:
485
+ public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
486
+ switch(expectedStaticText) {
487
+ case ""LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR"":
488
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
489
+ break;
490
+ case ""LOGIN_SCREEN1_STATIC_TEXT_HEADING"":
491
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue();
492
+ break;
493
+ case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"":
494
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue();
495
+ break;
496
+ case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"":
497
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.getValue();
498
+ break;
499
+ case ""ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR"":
500
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
501
+ break;
502
+ case ""ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR"":
503
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
504
+ break;
505
+ case ""ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR"":
506
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
507
+ break;
508
+ case ""ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR"":
509
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
510
+ break;
511
+ case ""ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR"":
512
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
513
+ break;
514
+ case ""ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
515
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
516
+ break;
517
+ case ""ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
518
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
519
+ break;
520
+ case ""ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
521
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
522
+ break;
523
+ case ""ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR"":
524
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
525
+ break;
526
+ case ""ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR"":
527
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
528
+ break;
529
+ case ""ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR"":
530
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
531
+ break;
532
+ case ""ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR"":
533
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR.getValue();
534
+ break;
535
+ case ""ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR"":
536
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
537
+ break;
538
+ case ""ONBOARDING_UTILITY_SCREEN_STATIC_TEXT"":
539
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_UTILITY_SCREEN_STATIC_TEXT.getValue();
540
+ break;
541
+ case ""ONBOARDING_LMI_SCREEN_STATIC_TEXT"":
542
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_LMI_SCREEN_STATIC_TEXT.getValue();
543
+ break;
544
+ case ""ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT"":
545
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT.getValue();
546
+ break;
547
+ case ""ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR"":
548
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
549
+ break;
550
+ default:
551
+ 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"");
552
+ }"
553
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
554
+
555
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
556
+
557
+ ### Input:
558
+ 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
559
+
560
+ ### Output:
561
+ public void GivenAfterFetchingDataFromDataFileIEnterAllMandatoryFieldsFirstNameLastNamePhoneNumberEmailIdRoleAndMappedLocationNikeFromTheList(String file, String value, String location) throws FileNotFoundException, IOException
562
+ {
563
+ if((file!=null)&&(file.contains(""data file""))) {
564
+ value=commonPage.fetchDataFromDataProperties(value);
565
+ location=commonPage.fetchDataFromDataProperties(location);
566
+ }
567
+
568
+ userManagementPage.enterFirstName(value+generatedString);
569
+ userManagementPage.enterLastName(value+generatedString);
570
+ userManagementPage.enterEmail(value+generatedString+"""
571
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
572
+
573
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
574
+
575
+ ### Input:
576
+ I verify (.*) user is edited
577
+
578
+ ### Output:
579
+ public void ThenIVerifyUserIsEdited(String user)
580
+ {
581
+ userManagementPage.varifyUserCreatedOrEdited(user+generatedString);
582
+ }"
583
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
584
+
585
+ ### 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:
586
+
587
+ ### Input:
588
+ Select product in {int} list
589
+
590
+ ### Output:
591
+ public boolean searchResultPageIsDisplayed() {
592
+ Wait.untilPageReadyState(webDriver, 5L);
593
+ resultTitle.isDisplayed();
594
+ urutkanOptionButton.isDisplayed();
595
+ listViewButton.isDisplayed();
596
+ gridViewButton.isDisplayed();
597
+ return true;
598
+ }"
599
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
600
+
601
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
602
+
603
+ ### Input:
604
+ I provide the Utility Details
605
+
606
+ ### Output:
607
+ public void provide_UtilityDetails() {
608
+ utilityScreenPage.provideUtilityDetails();
609
+ }
610
+ }"
611
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
612
+
613
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
614
+
615
+ ### Input:
616
+ After fetching data from data file )?I prepare payload for email (.*) for (.*) API( with (.*) (project|location))?
617
+
618
+ ### Output:
619
+ public String preparePayload(String file, String email, String apiName, String anyProjectOrLocation, String specificProjectOrLocations, String projectOrlocation) throws Exception {
620
+
621
+ if((file!=null) && (file.contains(""data file""))) {
622
+ email=commonPage.fetchDataFromDataProperties(email);
623
+ }
624
+
625
+ clientid=commonPage.fetchDataFromDataProperties(""clientId"");
626
+ int businessEntityId, cId;
627
+ String landlordProjectIds, locationId, locationId1, locationId2, locationId3, groupName, bcAssetId, projectIds1, projectIds2, projectIds, bcAssetId1, bcAssetId2;
628
+
629
+ switch(apiName) {
630
+ case ""session"":
631
+ payload=sessionAPIParameterizedPayload1+clientid+(String.format(sessionAPIParameterizedPayload2, email));
632
+ break;
633
+ case ""authkey"":
634
+ String payload1=String.format(authkeyAPIParameterizedPayload, email);
635
+ String otpCode=CommonSteps.otp.toString();
636
+ String payload2=""\""},\""ClientId\"":\"""";
637
+ String payload3=""\"",\""Session\"":\"""";
638
+ String payload4=""\""}"";
639
+ payload=payload1+otpCode+payload2+clientid+payload3+session+payload4;
640
+ break;
641
+ case ""consent"":
642
+ payload=String.format(consentAPIParameterizedPayload, email);
643
+ break;
644
+ case ""landLease"":
645
+ String projectId="""", vendorId="""";
646
+ if((file!=null) && (file.contains(""data file""))) {
647
+ projectId=commonPage.fetchDataFromDataProperties(""projectIdForIncomeAPI"");
648
+ // vendorId=commonPage.fetchDataFromDataProperties(""vendorIdForIncomeAPI"");
649
+ }
650
+ // String payload5=String.format(incomeAPIParameterizedPayload1, projectId);
651
+ // String payload6=String.format(incomeAPIParameterizedPayload2, vendorId);
652
+ // payload=payload5+payload6;
653
+ // landlordProjectIds=commonPage.fetchDataFromDataProperties(""landlordProjectIds"");
654
+ businessEntityId=Integer.parseInt(commonPage.fetchDataFromDataProperties(""businessEntityId2""));
655
+ cId=Integer.parseInt(commonPage.fetchDataFromDataProperties(""customerId2""));
656
+ payload=Payload.projectsForLandlord(businessEntityId, cId, projectId);
657
+ break;
658
+ case ""helpAndSupportEmail"":
659
+ payload=String.format(helpAndSupportEmailParameterizedPayload, email);
660
+ break;
661
+ case ""createNewUser"":
662
+ String firstName=commonPage.fetchDataFromDataProperties(""userFirstName"");
663
+ String lastName=commonPage.fetchDataFromDataProperties(""userLastName"");
664
+ String userEmail=""automationemail""+(commonPage.generatedString)+"""
665
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
666
+
667
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
668
+
669
+ ### Input:
670
+ After fetching data from data file )?I upload (.*) Utility bill document
671
+
672
+ ### Output:
673
+ public void uploadLmiDocument(String file, String value) throws AWTException, IOException {
674
+ if((file!=null)&&(file.contains(""data file"")))
675
+ value=commonPage.fetchDataFromDataProperties(value);
676
+ dataHealthPagePage.uploadDocument(value);
677
+ }"
678
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
679
+
680
+ ### 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:
681
+
682
+ ### Input:
683
+ I click on Submit button on Login screen
684
+
685
+ ### Output:
686
+ public void submitLogin() {
687
+ otpTextFields.submit();
688
+ waitABit(10000);
689
+ }"
690
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
691
+
692
+ ### 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:
693
+
694
+ ### Input:
695
+ I click on Delete Group button on delete group pop up
696
+
697
+ ### Output:
698
+ public void clickDeleteGroupOnPopup(){
699
+ clickOn(deleteGroupPopupButton);
700
+ }"
701
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
702
+
703
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
704
+
705
+ ### Input:
706
+ I click on Continue button on success message
707
+
708
+ ### Output:
709
+ public void ThenIClickOnContinueButtonOnSuccessMessage()
710
+ {
711
+ userManagementPage.clickOnContinueButton();
712
+ }"
713
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
714
+
715
+ ### 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:
716
+
717
+ ### Input:
718
+ Input data with {string} in search bar
719
+
720
+ ### Output:
721
+ public void setSearchInput(String product) {
722
+ searchInput.isEnabled();
723
+ searchInput.click();
724
+ searchInput.sendKeys(product);
725
+ }"
726
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
727
+
728
+ ### 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:
729
+
730
+ ### Input:
731
+ After fetching data from data file )?I should get a masking on (email|mobile number) (.*
732
+
733
+ ### Output:
734
+ public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
735
+ properties=new Properties();
736
+ properties.load(new FileInputStream(new File(""./data.properties"")));
737
+ String value=properties.getProperty(key);
738
+ return value;
739
+ }"
740
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
741
+
742
+ ### 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:
743
+
744
+ ### Input:
745
+ I verify property name (.*) in selected in dropdown and on property detail page is same
746
+
747
+ ### Output:
748
+ public void varifyPropertysSelectedOnDropdownAndPageAreSame(String propertyName) {
749
+ String SelectedPropertyfromDropdown=String.format(parameterizedSelectedPropertyfromDropdown, propertyName);
750
+ String PropertyNameOnPage=String.format(parameterizedPropertyNameOnPage, propertyName);
751
+ WebElement SelectedPropertyfromDropdownEle=getDriver().findElement(By.xpath(SelectedPropertyfromDropdown));
752
+ WebElement PropertyNameOnPageEle=getDriver().findElement(By.xpath(PropertyNameOnPage));
753
+ Assert.isTrue((SelectedPropertyfromDropdownEle.getText()).equals(PropertyNameOnPageEle.getText()));
754
+ }"
755
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
756
+
757
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
758
+
759
+ ### Input:
760
+ After fetching data from data file )?I edit Address in Customer Profile
761
+
762
+ ### Output:
763
+ public void enterSecondScreenDetails(String file,DataTable dataTable) {
764
+ List<List<String>> data = dataTable.raw();
765
+ adminLoginPage.enterCity(data.get(0).get(0));
766
+ adminLoginPage.enterAddress1(data.get(0).get(1));
767
+ adminLoginPage.enterAddress2(data.get(0).get(2));
768
+ }"
769
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
770
+
771
+ ### 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:
772
+
773
+ ### Input:
774
+ I validate that Email is successfully sent
775
+
776
+ ### Output:
777
+ public void validateEmailSentSuccessfully() {
778
+ waitFor(emailSentSuccessfullyMessage);
779
+ }"
780
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
781
+
782
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
783
+
784
+ ### Input:
785
+ After fetching data from data file)? I click on project (.*
786
+
787
+ ### Output:
788
+ public void userToEditInformationUser(String file,String value) throws FileNotFoundException, IOException
789
+ {
790
+ if((file!=null)&&(file.contains(""data file"")))
791
+ value=commonPage.fetchDataFromDataProperties(value);
792
+ propertyDetailsPage.clickOnProjectName(value);
793
+ }"
794
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
795
+
796
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
797
+
798
+ ### Input:
799
+ I choose to Go Back
800
+
801
+ ### Output:
802
+ public void goBack() {
803
+ loginSecondScreenPage.goBack();
804
+ }"
805
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
806
+
807
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
808
+
809
+ ### Input:
810
+ I fetch value of (.*) from response of (.*) API and write to data file
811
+
812
+ ### Output:
813
+ public void writeToDataFileFromResponse(String key, String apiName) throws IOException {
814
+ String value=getJsonPath(response,key);
815
+
816
+ if(apiName.contains(""history"")) {
817
+ docId=value;
818
+ System.out.println(""doc id value is: ""+docId);
819
+ commonPage.writeToDataProperties(docId);
820
+ }
821
+ }"
822
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
823
+
824
+ ### 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:
825
+
826
+ ### Input:
827
+ I enter (card|US bank account) details for utility savings
828
+
829
+ ### Output:
830
+ public void enterCardDetails(String cardNumberValue, String expiryValue, String cvcValue, String dobValue) {
831
+ getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='__PrivateStripeElement']//iframe[1]"")));
832
+ waitFor(cardNumberTextField);
833
+ typeInto(cardNumberTextField, cardNumberValue);
834
+ typeInto(expiryTextField, expiryValue);
835
+ typeInto(cvcTextField, cvcValue);
836
+ getDriver().switchTo().defaultContent();
837
+ typeInto(dobTextField, dobValue);
838
+ }"
839
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
840
+
841
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
842
+
843
+ ### Input:
844
+ I click on (.*) page
845
+
846
+ ### Output:
847
+ public void change_page(String page) {
848
+ billingPage.changePage(page);
849
+ }"
850
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
851
+
852
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
853
+
854
+ ### Input:
855
+ I click on (.*) tab
856
+
857
+ ### Output:
858
+ public void clickTab(String tabText) {
859
+ commonPage.clickTab(tabText);
860
+ }"
861
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
862
+
863
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
864
+
865
+ ### Input:
866
+ I change to (.*) filter
867
+
868
+ ### Output:
869
+ public void change_filter(String filter) {
870
+ billingPage.changeFilter(filter);
871
+ }"
872
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
873
+
874
+ ### 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:
875
+
876
+ ### Input:
877
+ I see static text (.*) in Login screen
878
+
879
+ ### Output:
880
+ public String fetchStaticTextConstantsfromEnum(String expectedStaticText) throws Exception {
881
+ switch(expectedStaticText) {
882
+ case ""LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR"":
883
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
884
+ break;
885
+ case ""LOGIN_SCREEN1_STATIC_TEXT_HEADING"":
886
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN1_STATIC_TEXT_HEADING.getValue();
887
+ break;
888
+ case ""LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING"":
889
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_EMAIL_HEADING.getValue();
890
+ break;
891
+ case ""LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING"":
892
+ expectedStaticText=SupReferralLoginStaticTextsEnum.LOGIN_SCREEN2_STATIC_TEXT_MOBILE_HEADING.getValue();
893
+ break;
894
+ case ""ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR"":
895
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_EXPANDING_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
896
+ break;
897
+ case ""ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR"":
898
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_MARYLAND_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
899
+ break;
900
+ case ""ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR"":
901
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_HAWAII_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
902
+ break;
903
+ case ""ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR"":
904
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_NEW_JERSEY_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
905
+ break;
906
+ case ""ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR"":
907
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_FARM_AVAILABLE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
908
+ break;
909
+ case ""ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
910
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_MARYLAND_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
911
+ break;
912
+ case ""ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
913
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_HAWAII_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
914
+ break;
915
+ case ""ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR"":
916
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_NEW_JERSEY_GETTING_CLEANER_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
917
+ break;
918
+ case ""ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR"":
919
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_COMMUNITY_GREEN_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
920
+ break;
921
+ case ""ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR"":
922
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_YOU_ARE_ALL_DONE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
923
+ break;
924
+ case ""ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR"":
925
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
926
+ break;
927
+ case ""ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR"":
928
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_THANK_YOU_SCREEN_FARM_UNAVAILABLE_STATIC_TEXT_BLUE_BAR.getValue();
929
+ break;
930
+ case ""ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR"":
931
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_ESTIMATE_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
932
+ break;
933
+ case ""ONBOARDING_UTILITY_SCREEN_STATIC_TEXT"":
934
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_UTILITY_SCREEN_STATIC_TEXT.getValue();
935
+ break;
936
+ case ""ONBOARDING_LMI_SCREEN_STATIC_TEXT"":
937
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_LMI_SCREEN_STATIC_TEXT.getValue();
938
+ break;
939
+ case ""ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT"":
940
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_BENEFIT_SCREEN_STATIC_TEXT.getValue();
941
+ break;
942
+ case ""ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR"":
943
+ expectedStaticText=OnboardingStaticTextsEnum.ONBOARDING_PAYMENT_SCREEN_STATIC_TEXT_BLUE_BAR.getValue();
944
+ break;
945
+ default:
946
+ 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"");
947
+ }"
948
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
949
+
950
+ ### 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:
951
+
952
+ ### Input:
953
+ I should see {int} {product} in the cart
954
+
955
+ ### Output:
956
+ public String getProductName() {
957
+ return getElementText(productNameFld);
958
+ }"
959
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
960
+
961
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
962
+
963
+ ### Input:
964
+ I successfully download the Bill
965
+
966
+ ### Output:
967
+ public void downloadBill() {
968
+ billingPage.downloadBill();
969
+ }
970
+ }"
971
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
972
+
973
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
974
+
975
+ ### Input:
976
+ I get error message (.*) for firstname
977
+
978
+ ### Output:
979
+ public void ThenIGetErrorMessageForFirstname(String expectedError) throws Exception
980
+ {
981
+ expectedError=commonPage.fetchUserManagementErrorMessageConstantsfromEnum(expectedError);
982
+ userManagementPage.validateErrorMessage(""First Name"", expectedError);
983
+ }"
984
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
985
+
986
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
987
+
988
+ ### Input:
989
+ After fetching data from data file)? I enter first name (.*), last name, phone number, email id
990
+
991
+ ### Output:
992
+ public void ThenIEnterFirstNameLastNamePhoneNumberEmailId(String file, String value) throws FileNotFoundException, IOException
993
+ {
994
+ if((file!=null)&&(file.contains(""data file"")))
995
+ value=commonPage.fetchDataFromDataProperties(value);
996
+ Random objGenerator = new Random();
997
+ int randomNumber = objGenerator.nextInt(99);
998
+
999
+ userManagementPage.enterFirstName(value+generatedString);
1000
+ userManagementPage.enterLastName(value+generatedString);
1001
+ userManagementPage.enterEmail(value+generatedString+"""
1002
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1003
+
1004
+ ### 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:
1005
+
1006
+ ### Input:
1007
+ I click on (.*) button
1008
+
1009
+ ### Output:
1010
+ public void clickButton(String buttonText) {
1011
+ String buttonXpath=String.format(parameterizedButton, buttonText);
1012
+ WebElement elem=getDriver().findElement(By.xpath(buttonXpath));
1013
+ WebDriverWait wait=new WebDriverWait(getDriver(),15);
1014
+ wait.until(ExpectedConditions.elementToBeClickable(elem));
1015
+ elem.click();
1016
+ }"
1017
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1018
+
1019
+ ### 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:
1020
+
1021
+ ### Input:
1022
+ After fetching data from data file)? I verify (.*) breadcrumb near to property breadcrumb
1023
+
1024
+ ### Output:
1025
+ public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
1026
+ properties=new Properties();
1027
+ properties.load(new FileInputStream(new File(""./data.properties"")));
1028
+ String value=properties.getProperty(key);
1029
+ return value;
1030
+ }"
1031
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1032
+
1033
+ ### 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:
1034
+
1035
+ ### Input:
1036
+ I select the role user
1037
+
1038
+ ### Output:
1039
+ public void selectRole(int num) throws InterruptedException {
1040
+ String role=String.format(parameterizedRole, num);
1041
+ WebElement elem=getDriver().findElement(By.xpath(role));
1042
+ WebDriverWait wait=new WebDriverWait(getDriver(),15);
1043
+ wait.until(ExpectedConditions.elementToBeClickable(elem));
1044
+ Thread.sleep(2000);
1045
+ clickOn(elem);
1046
+ }"
1047
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1048
+
1049
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1050
+
1051
+ ### Input:
1052
+ I add it again
1053
+
1054
+ ### Output:
1055
+ public void iAddItAgain() {
1056
+ storePage.addToCart(context.product.getName());
1057
+ }"
1058
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1059
+
1060
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1061
+
1062
+ ### Input:
1063
+ I enter all the details for signing up in Signup Screen-2
1064
+
1065
+ ### Output:
1066
+ public void enterSecondScreenDetails(DataTable dataTable) {
1067
+ List<List<String>> data = dataTable.raw();
1068
+ signUpSecondScreenPage.enterAddress1(data.get(0).get(0));
1069
+ signUpSecondScreenPage.enterAddress2(data.get(0).get(1));
1070
+ signUpSecondScreenPage.enterZipCode(data.get(0).get(2));
1071
+ signUpSecondScreenPage.enterCity(data.get(0).get(3));
1072
+ signUpSecondScreenPage.selectState(data.get(0).get(4));
1073
+ }"
1074
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1075
+
1076
+ ### 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:
1077
+
1078
+ ### Input:
1079
+ I accept Hawaii Disclosure
1080
+
1081
+ ### Output:
1082
+ public void acceptHawaiiDisclosure() {
1083
+ waitFor(acceptHawaiiDisclosureButton);
1084
+ JavascriptExecutor js = (JavascriptExecutor) getDriver();
1085
+ // getDriver().switchTo().frame(getDriver().findElement(By.xpath(""//div[@class='__PrivateStripeElement']//iframe[1]"")));
1086
+ // JavascriptExecutor js = (JavascriptExecutor) getDriver();
1087
+ waitFor(5000);
1088
+ js.executeScript(""window.scrollBy(0,550)"", """");
1089
+ clickOn(acceptHawaiiDisclosureButton);
1090
+ getDriver().switchTo().defaultContent();
1091
+ }"
1092
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1093
+
1094
+ ### 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:
1095
+
1096
+ ### Input:
1097
+ After fetching data from data file )?I validate that (.*) field is prepopulated with (.*) value
1098
+
1099
+ ### Output:
1100
+ public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
1101
+ properties=new Properties();
1102
+ properties.load(new FileInputStream(new File(""./data.properties"")));
1103
+ String value=properties.getProperty(key);
1104
+ return value;
1105
+ }"
1106
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1107
+
1108
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1109
+
1110
+ ### Input:
1111
+ After fetching data from data file )?I enter value (.*) in Signup mobile textfield
1112
+
1113
+ ### Output:
1114
+ public void enterEmailOrMobile(String file, String value) throws Throwable {
1115
+ if((file!=null)&&(file.contains(""data file"")))
1116
+ value=commonPage.fetchDataFromDataProperties(value);
1117
+ signUpFirstPage.enterLoginMobile(value);
1118
+ }"
1119
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1120
+
1121
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1122
+
1123
+ ### Input:
1124
+ After fetching data from data file )?I enter all the details for signing up in Signup Screen-1
1125
+
1126
+ ### Output:
1127
+ public void enterFirstScreenSignUpDetails(String file,DataTable dataTable) throws IOException {
1128
+ List<List<String>> data = dataTable.raw();
1129
+ signUpFirstPage.enterFirstName(data.get(0).get(0));
1130
+ signUpFirstPage.enterLastName(data.get(0).get(1));
1131
+ if((file!=null)&&(file.contains(""data file""))) {
1132
+ signUpFirstPage.enterEmail(commonPage.fetchDataFromDataProperties(data.get(0).get(2)));
1133
+ signUpFirstPage.enterMobileNumber(commonPage.fetchDataFromDataProperties(data.get(0).get(3)));
1134
+ }
1135
+ else{
1136
+ signUpFirstPage.enterEmail(data.get(0).get(2));
1137
+ signUpFirstPage.enterMobileNumber(data.get(0).get(3));
1138
+ }
1139
+ }"
1140
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1141
+
1142
+ ### 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:
1143
+
1144
+ ### Input:
1145
+ After fetching data from data file )?I fetch OTP of Email (.*
1146
+
1147
+ ### Output:
1148
+ public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
1149
+ properties=new Properties();
1150
+ properties.load(new FileInputStream(new File("".\\data.properties"")));
1151
+ String value=properties.getProperty(key);
1152
+ return value;
1153
+ }"
1154
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1155
+
1156
+ ### 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:
1157
+
1158
+ ### Input:
1159
+ I place an order
1160
+
1161
+ ### Output:
1162
+ public CheckoutPage placeOrder() {
1163
+ waitForOverlaysToDisappear(overlay);
1164
+ click(placeOrderBtn);
1165
+ return this;
1166
+ }"
1167
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1168
+
1169
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1170
+
1171
+ ### Input:
1172
+ I verify that logged in user is at top with mentioned and does not have delete and edit icon
1173
+
1174
+ ### Output:
1175
+ public void WhenIVerifyThatLoggedInUserIsAtTopWithMentionedAndDoesNotHaveDeleteAndEditIcon()
1176
+ {
1177
+ userManagementPage.varifyLoggedInUserShouldOnTOpOfGrid();
1178
+ }"
1179
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1180
+
1181
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1182
+
1183
+ ### Input:
1184
+ validate number of users asign to selected location or group
1185
+
1186
+ ### Output:
1187
+ public void ThenValidateNumberOfUsersAsignToSelectedLocationOrGroup()
1188
+ {
1189
+ System.out.println(userManagementPage.getNumOfUsers());
1190
+
1191
+ }
1192
+
1193
+
1194
+ }"
1195
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1196
+
1197
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1198
+
1199
+ ### Input:
1200
+ I see empty OTP textfields in Signup
1201
+
1202
+ ### Output:
1203
+ public void validateEmptyOtpTextfields() {
1204
+ signUpSecondScreenPage.validateOtpIsEmpty();
1205
+ }"
1206
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1207
+
1208
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1209
+
1210
+ ### Input:
1211
+ This is for invalid locators
1212
+
1213
+ ### Output:
1214
+ public void thisIsForInvalidLocators() {
1215
+ homePage.getInvalidLocators();
1216
+ }
1217
+ }"
1218
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1219
+
1220
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1221
+
1222
+ ### Input:
1223
+ I verify No payment available is displayed
1224
+
1225
+ ### Output:
1226
+ public void verifyNoPaymentavailable() {
1227
+ dashboardPage.verifyNoPaymentavailable();
1228
+ }"
1229
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1230
+
1231
+ ### 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:
1232
+
1233
+ ### Input:
1234
+ I verify tooltip text
1235
+
1236
+ ### Output:
1237
+ public String getToolTipText() {
1238
+ waitFor(toolTip);
1239
+ String ActualTotalNetMeteringToolTipText=toolTip.getText();
1240
+ return ActualTotalNetMeteringToolTipText;
1241
+ }"
1242
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1243
+
1244
+ ### 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:
1245
+
1246
+ ### Input:
1247
+ After fetching data from data file )?I enter group name (.*) in group pop up
1248
+
1249
+ ### Output:
1250
+ public String fetchDataFromDataProperties(String key) throws FileNotFoundException, IOException {
1251
+ properties=new Properties();
1252
+ properties.load(new FileInputStream(new File(""./data.properties"")));
1253
+ String value=properties.getProperty(key);
1254
+ return value;
1255
+ }"
1256
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1257
+
1258
+ ### 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:
1259
+
1260
+ ### Input:
1261
+ I (dont )?get error message (.*) for OTP textfields
1262
+
1263
+ ### Output:
1264
+ public String fetchErrorMessageConstantsfromEnum(String expectedError) throws Exception {
1265
+ switch(expectedError) {
1266
+ case ""INVALID_MOBILE_ERROR"":
1267
+ expectedError=LoginErrorMessagesEnum.INVALID_MOBILE_ERROR.getValue();
1268
+ break;
1269
+ case ""INVALID_EMAIL_ERROR"":
1270
+ expectedError=LoginErrorMessagesEnum.INVALID_EMAIL_ERROR.getValue();
1271
+ break;
1272
+ case ""EMAIL_MAX_50_CHARS"":
1273
+ expectedError=LoginErrorMessagesEnum.EMAIL_MAX_50_CHARS.getValue();
1274
+ break;
1275
+ case ""INCORRECT_OTP"":
1276
+ expectedError=LoginErrorMessagesEnum.INCORRECT_OTP.getValue();
1277
+ break;
1278
+ case ""INCOMPLETE_OTP"":
1279
+ expectedError=LoginErrorMessagesEnum.INCOMPLETE_OTP.getValue();
1280
+ break;
1281
+ case ""INVALID_SESSION"":
1282
+ expectedError=LoginErrorMessagesEnum.INVALID_SESSION.getValue();
1283
+ break;
1284
+ case ""INCORRECT_PASSWORD"":
1285
+ expectedError=LoginErrorMessagesEnum.INCORRECT_PASSWORD.getValue();
1286
+ break;
1287
+ case ""USER_DISABLED"":
1288
+ expectedError=LoginErrorMessagesEnum.USER_DISABLED.getValue();
1289
+ break;
1290
+ default:
1291
+ throw new Exception(""This Expected Error in feature file is not present in the list of expected errors in switch case or Enum file"");
1292
+ }"
1293
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1294
+
1295
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1296
+
1297
+ ### Input:
1298
+ I select Flag customer application
1299
+
1300
+ ### Output:
1301
+ public void flagCustomer() {
1302
+ adminLoginPage.clickFlagCustomer();
1303
+ }"
1304
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1305
+
1306
+ ### 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:
1307
+
1308
+ ### Input:
1309
+ I should see an error
1310
+
1311
+ ### Output:
1312
+ public String getValidationMsg() {
1313
+ return getElementElementCustomAttribute(quantityInputFld, ""validationMessage"");
1314
+ }"
1315
+ "### Instruction: Use the Task below and the Input given to write the Response, which is a Java programming code that can solve the following Task:
1316
+
1317
+ ### Task: Write automation script for UI Testing that contains only a step definition function, written using Cucumber and Selenium frameworks, for the following input:
1318
+
1319
+ ### Input:
1320
+ I click on pencil icon to edit group
1321
+
1322
+ ### Output:
1323
+ public void ThenIClickOnPencilIconToEditGroup()
1324
+ {
1325
+ userManagementPage.clickOnPencilIconToEditGroup();
1326
+ }"