Created
June 21, 2021 23:26
-
-
Save photizzo/549c8ac24a9ba5b4e00f550f5850057e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set timeout for driver actions (similar to step timeout) | |
driver.manage().timeouts().implicitlyWait(15000, TimeUnit.MILLISECONDS); | |
By by; | |
boolean booleanResult; | |
// 1. Navigate to '{{ApplicationURL}}' | |
// Navigates the specified URL (Auto-generated) | |
GeneratedUtils.sleep(500); | |
driver.navigate().to(ApplicationURL); | |
// 2. Click 'identity' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='identity']"); | |
driver.findElement(by).click(); | |
// 3. Type '[email protected]' in 'identity' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='identity']"); | |
driver.findElement(by).sendKeys("[email protected]"); | |
// 4. Click 'password' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='password']"); | |
driver.findElement(by).click(); | |
// 5. Type '@Aktuarial4' in 'password' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='password']"); | |
driver.findElement(by).sendKeys("@Aktuarial4"); | |
// 6. Click 'Login' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[. = 'Login']"); | |
driver.findElement(by).click(); | |
// 7. Is 'Home' present? | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//a[. = 'Home']"); | |
driver.findElement(by); | |
// 8. Does 'OVERVIEW' contain 'OVERVIEW'? | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//div[. = 'OVERVIEW']"); | |
Assertions.assertTrue(driver.findElement(by).getText().contains("OVERVIEW")); | |
// 9. Click 'Request Quote' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//a[. = 'Request Quote']"); | |
driver.findElement(by).click(); | |
// 10. Type 'General' in 'lineOfBusinessId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='lineOfBusinessId']"); | |
driver.findElement(by).sendKeys("General"); | |
// 11. Type 'Individual' in 'clientType' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='clientType']"); | |
driver.findElement(by).sendKeys("Individual"); | |
// 12. Type 'sol' in 'react-select-2-input' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("#react-select-2-input"); | |
driver.findElement(by).sendKeys("sol"); | |
// 13. Click 'react-select-2-option-0' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("#react-select-2-option-0"); | |
driver.findElement(by).click(); | |
// 14. Click 'categoryId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='categoryId']"); | |
driver.findElement(by).click(); | |
// 15. Select the '5' option in 'categoryId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='categoryId']"); | |
(new Select(driver.findElement(by))).selectByValue("5"); | |
// 16. Click 'categoryId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='categoryId']"); | |
driver.findElement(by).click(); | |
// 17. Click 'providerId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='providerId']"); | |
driver.findElement(by).click(); | |
// 18. Select the '1' option in 'providerId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='providerId']"); | |
(new Select(driver.findElement(by))).selectByValue("1"); | |
// 19. Click 'providerId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='providerId']"); | |
driver.findElement(by).click(); | |
// 20. Click 'insuranceProduct' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='insuranceProduct']"); | |
driver.findElement(by).click(); | |
// 21. Select the 'AIICO third party' option in 'insuranceProduct' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='insuranceProduct']"); | |
(new Select(driver.findElement(by))).selectByValue("AIICO third party"); | |
// 22. Click 'insuranceProduct' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='insuranceProduct']"); | |
driver.findElement(by).click(); | |
// 23. Type 'WE' in 'quoteNumberPrefix' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='quoteNumberPrefix']"); | |
driver.findElement(by).sendKeys("WE"); | |
// 24. Click 'vehicleTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='vehicleTypeId']"); | |
driver.findElement(by).click(); | |
// 25. Select the '1' option in 'vehicleTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='vehicleTypeId']"); | |
(new Select(driver.findElement(by))).selectByValue("1"); | |
// 26. Click 'vehicleTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='vehicleTypeId']"); | |
driver.findElement(by).click(); | |
// 27. Click 'policyHolderTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='policyHolderTypeId']"); | |
driver.findElement(by).click(); | |
// 28. Select the '2' option in 'policyHolderTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='policyHolderTypeId']"); | |
(new Select(driver.findElement(by))).selectByValue("2"); | |
// 29. Click 'policyHolderTypeId' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='policyHolderTypeId']"); | |
driver.findElement(by).click(); | |
// 30. Click 'DIV20' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//section/div[2]/div[2]/div[2]/div/div/div"); | |
driver.findElement(by).click(); | |
// 31. Click 'Start Date (required)' | |
GeneratedUtils.sleep(500); | |
by = By.cssSelector("[name='Start Date (required)']"); | |
driver.findElement(by).click(); | |
// 32. Click 'Next Month1' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[. = 'Next Month']"); | |
driver.findElement(by).click(); | |
// 33. Click '12' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//div[. = '1']"); | |
driver.findElement(by).click(); | |
// 34. Click 'DIV21' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//div[2]/div[3]/div/div/div"); | |
driver.findElement(by).click(); | |
// // 35. Click 'End Date (required)' | |
// GeneratedUtils.sleep(500); | |
// by = By.cssSelector("[name='End Date (required)']"); | |
// driver.findElement(by).click(); | |
// 36. Click 'Next Month1' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[2]"); | |
driver.findElement(by).click(); | |
// 37. Click 'Next Month1' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[2]"); | |
driver.findElement(by).click(); | |
// 38. Click '13' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//div[1][. = '1']"); | |
driver.findElement(by).click(); | |
// 39. Click 'Preview Quote' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[. = 'Preview Quote']"); | |
driver.findElement(by).click(); | |
// 40. Click 'Save Quote' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[. = 'Save Quote']"); | |
driver.findElement(by).click(); | |
// 41. Is 'Quote has been sent for approval' present? | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//h4[. = 'Quote has been sent for approval']"); | |
driver.findElement(by); | |
// 42. Click 'Close' | |
GeneratedUtils.sleep(500); | |
by = By.xpath("//button[. = 'Close']"); | |
driver.findElement(by).click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment