diff --git a/.gitignore b/.gitignore index 1b3bb4308..ff0cd8c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,4 @@ src/main/resources/.DS_Store src/test/java/ServiceNow/COVIDDash/Resources/.DS_Store src/test/java/ServiceNow/PlatformBusinessApps/CCT_CHAT_BOT/Playwright/Steps/Example.java src/test/java/PlaywrightTests_sandbox -src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/Example.java \ No newline at end of file +src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/Steps/Example.java diff --git a/src/test/java/CustomBusiness/CCR/Constants/CCR_CONSTANTS.java b/src/test/java/CustomBusiness/CCR/Constants/CCR_CONSTANTS.java index a543b8a05..fe947778a 100644 --- a/src/test/java/CustomBusiness/CCR/Constants/CCR_CONSTANTS.java +++ b/src/test/java/CustomBusiness/CCR/Constants/CCR_CONSTANTS.java @@ -1,8 +1,8 @@ package CustomBusiness.CCR.Constants; public class CCR_CONSTANTS { - - public static final String CV = System.getProperty("user.dir") + "/src/test/java/CustomBusiness/CCR/Resources/CV.docx"; - public static final String DIVERSITY_STATEMENT = System.getProperty("user.dir") + "/src/test/java/CustomBusiness/CCR/Resources/DiversityStatement.docx"; - public static final String LETTER_OF_INTEREST = System.getProperty("user.dir") + "/src/test/java/CustomBusiness/CCR/Resources/LetterOfInterest.docx"; + public static final String APPLICANT = "Alena Nekrashevich"; + public static final String ADMIN = "Lori Holliday"; + public static final String CV = "C:\\Users\\nekrashevicha2\\Desktop\\CBIIT-Test-Automation\\src\\test\\java\\CustomBusiness\\CCR\\Resources\\CV.docx"; + public static final String RESEARCH_GOALS ="C:\\Users\\nekrashevicha2\\Desktop\\CBIIT-Test-Automation\\src\\test\\java\\CustomBusiness\\CCR\\Resources\\ResearchGoals.docx"; } diff --git a/src/test/java/CustomBusiness/CCR/Features/LandingPage.feature b/src/test/java/CustomBusiness/CCR/Features/LandingPage.feature index 4055a94be..f1197517b 100644 --- a/src/test/java/CustomBusiness/CCR/Features/LandingPage.feature +++ b/src/test/java/CustomBusiness/CCR/Features/LandingPage.feature @@ -1,24 +1,26 @@ Feature: CCR Landing Page Scenarios - Background: common steps - Given User is on CCR Landing page and user is "internal user" - - @Nekrashevich @Regression @Smoke @landingPage + @Nekrashevich @Regression @Smoke @CAMS-7 Scenario: Verify CCR Landing Page items + Given User is on CCR Landing page and user is "internal user" And User can see "Home" tab displayed And User can see "Positions" tab displayed - @Nekrashevich @Regression @Smoke @fillApplication @CAMS-9 - Scenario Outline: Fill In An Application As An Internal User - And User navigates to "Biostatistician" open vacancy - And User clicks "Apply Now" button + @Nekrashevich @Regression @Smoke @fillApplication @CAMS-9 @CAMS-5 @CAMS-17 @CAMS-38 + Scenario Outline: Fill In An Application As An Internal User End to End flow + Given User is on CCR Landing page and user is "admin user" + And Admin User creates a new vacancy + And User logs out of CCR application + And User is on CCR Landing page and user is "internal user" + And User navigates to "Chief Technical Officer" open vacancy + And User applies for that vacancy And User enters "" into a first name field And User enter "" into a middle name field And User enters "" into a last name field And User enters "" into an email field And User enters "" into a phone field And User enters "" into a business phone field - And User selects " Ph.D. " from a degree dropdown + And User selects Other from a degree dropdown And User enters "" into an other degree field And User confirms that User is a US Citizen And User clicks Next button for "Basic Information" section @@ -38,17 +40,25 @@ Feature: CCR Landing Page Scenarios And User enters "" into a business zip field And User selects United States from a country dropdown for "Business Address" section And User clicks Next button for "Business Address" section - And User uploads "Letter of Interest" document - And User uploads "CV/Bibliography" document - And User uploads "Upload Diversity Statement" document + And User enters "" into a reference First name field + And User enters "" into a reference Last name field + And User enters "" into a reference Email field + And User enters "" into a reference Phone Number field + And User selects M.D., Ph.D. from a reference degree dropdown + And User clicks Next button for "Reference" section + And User uploads "CV" document + And User uploads "Research Goals" document And User clicks Next button for "Required Documents" section And User selects an outreach source as "Contacted By Member" And User selects "Yes" for the question on simplicity of uploading application materials And User selects "Yes" for the question on whether the ad posted on the website contains enough information to decide on applying for a job And User inputs "No suggestions at the moment" in the changing process text field - And User clicks "Submit" button + And User submits CCR Careers application + And User logs out of CCR application + Given User is on CCR Landing page and user is "admin user" + And Admin User deletes a newly created vacancy Examples: - | firstName | middleName | lastName | email | phone | businessPhone | otherDegree(s) | address | address2 | city | state | zip | department | institution | businessAddress | businessAddress2 | businessCity | businessState | businessZip | - | Elena | Maria | Beloli | elena@gmail.com | 2012212343 | 2023323454 | MBA | 7 Mills | Drive | Reston| VA | 20453 | Research | NCI | 43 Cal Dr | Full Circuit | Mclean | VA | 20567 | + | firstName | middleName | lastName | email | phone | businessPhone | referenceFirstName| referenceLastName| referenceEmail|referencePhoneNumber | otherDegree(s) | address | address2 | city | state | zip | department | institution | businessAddress | businessAddress2 | businessCity | businessState | businessZip | + | Elena | Maria | Beloli | elena@gmail.com | 2012212343 | 2023323454 | John | Molls | test@gmail.com| 2123345678 | MBA | 7 Mills | Drive | Reston| VA | 20453 | Research | NCI | 43 Cal Dr | Full Circuit | Mclean | VA | 20567 | diff --git a/src/test/java/CustomBusiness/CCR/Pages/CCRAdminUserPage.java b/src/test/java/CustomBusiness/CCR/Pages/CCRAdminUserPage.java new file mode 100644 index 000000000..d3ff8df12 --- /dev/null +++ b/src/test/java/CustomBusiness/CCR/Pages/CCRAdminUserPage.java @@ -0,0 +1,62 @@ +package CustomBusiness.CCR.Pages; + +import com.nci.automation.web.CommonUtils; +import com.nci.automation.web.WebDriverUtils; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + + public class CCRAdminUserPage extends CommonUtils { + + public CCRAdminUserPage() { + PageFactory.initElements(WebDriverUtils.webDriver, this); + } + + /** Positions tab**/ + @FindBy(xpath = "//li//a[.=' Positions ']") + public WebElement tabPositions; + + /** button Add Position**/ + @FindBy(xpath = "//a[@class='btn btn-default btn-sm border-0 mt-0 mb-0 ng-scope']") + public WebElement buttonAddPosition; + + /** field Position Title**/ + @FindBy(xpath = "//input[@id='title']") + public WebElement fieldPositionTitle; + + /** field Description**/ + @FindBy(xpath = "//body[@data-id='description']//p") + public WebElement fieldDescription; + + /** Todays Date Active Datepicker Choice**/ + @FindBy(xpath = "//button[@class='btn btn-default btn-sm active']") + public WebElement todaysDateActiveField; + + /** Open Date Calendar**/ + @FindBy(xpath = "(//i[@class='fa fa-calendar'])[1]") + public WebElement openDateCalendar; + + /** Description text box iframe**/ + @FindBy(xpath = "//iframe[@id='description_ifr']") + public WebElement descriptionTextBoxIframe; + + /** button Save position**/ + @FindBy(xpath = "(//div[@class='text-center']//button[.=' Save '])[1]") + public WebElement buttonSaveNewPosition; + + /** button Remove newly created position**/ + @FindBy(xpath = "(//button[@class='btn btn-sm btn-danger m-0'])[1]") + public WebElement buttonRemoveNewlyCreatedPosition; + + /** button Ok Removing Position Modal**/ + @FindBy(xpath = "(//button[@ng-click='buttonClicked(button)'])[2]") + public WebElement buttonOkRemovingPositionModal; + + /** Position was removed Confirmation Message**/ + @FindBy(xpath = "//p[.='The position and all associated applicant data have been removed from the system.']") + public WebElement confirmationMessagePositionWasRemoved; + + /** Acknowledge Position was removed Confirmation Modal**/ + @FindBy(xpath = "//button[@ng-click='buttonClicked(button)']") + public WebElement acknowledgeConfirmationModalPositionWasRemoved; + } diff --git a/src/test/java/CustomBusiness/CCR/Pages/CCRApplicationPage.java b/src/test/java/CustomBusiness/CCR/Pages/CCRApplicantPage.java similarity index 71% rename from src/test/java/CustomBusiness/CCR/Pages/CCRApplicationPage.java rename to src/test/java/CustomBusiness/CCR/Pages/CCRApplicantPage.java index 8dead4cb1..6128eaf78 100644 --- a/src/test/java/CustomBusiness/CCR/Pages/CCRApplicationPage.java +++ b/src/test/java/CustomBusiness/CCR/Pages/CCRApplicantPage.java @@ -6,9 +6,9 @@ import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; -public class CCRApplicationPage extends CommonUtils { +public class CCRApplicantPage extends CommonUtils { - public CCRApplicationPage() { + public CCRApplicantPage() { PageFactory.initElements(WebDriverUtils.webDriver, this); } @@ -80,8 +80,28 @@ public CCRApplicationPage() { @FindBy(xpath = "(//div//button[contains(text(),' Next ')])[3]") public WebElement nextButtonBusinessAddressSection; - /** Next Button Required Documents Section **/ + /** Next Button Reference Section **/ @FindBy(xpath = "(//div//button[contains(text(),' Next ')])[4]") + public WebElement nextButtonReferenceSection; + + /** Reference First Name Field **/ + @FindBy(xpath = "//input[@id='reference_0_first_name']") + public WebElement refFirstNameField; + + /** Reference Last Name Field **/ + @FindBy(xpath = "//input[@id='reference_0_last_name']") + public WebElement refLastNameField; + + /** Reference Email Field **/ + @FindBy(xpath = "//input[@id='reference_0_email']") + public WebElement refEmailField; + + /** Reference Phone Number Field **/ + @FindBy(xpath = "//input[@id='reference_0_phone']") + public WebElement refPhoneNumberField; + + /** Next Button Required Documents Section **/ + @FindBy(xpath = "(//div//button[contains(text(),' Next ')])[5]") public WebElement nextButtonRequiredDocumentsSection; /** Department Field **/ @@ -137,29 +157,13 @@ public CCRApplicationPage() { public WebElement submitButton; /** Submit Confirmation Button **/ - @FindBy(xpath = "//button[@class='btn btn-primary mx-2']") + @FindBy(xpath = "(//button[@ng-click='buttonClicked(button)'])[2]") public WebElement submitConfirmationButton; /** Close Application Submitted Button **/ - @FindBy(xpath = "//button[@class='btn btn-primary mx-2']") + @FindBy(xpath = "//button[@ng-repeat='button in options.buttons track by button.label']") public WebElement closeApplicationSubmittedButton; - /** Upload File1 **/ - @FindBy(xpath = "//label[normalize-space()='Upload Letter of Interest']//parent::div//child::div[1]//child::input") - public WebElement uploadFile1; - - /** Upload File2 **/ - @FindBy(xpath = "(//input[@placeholder='No file chosen'])[2]") - public WebElement uploadFile2; - - /** Upload File3 **/ - @FindBy(xpath = "(//input[@placeholder='No file chosen'])[3]") - public WebElement uploadFile3; - - /** Outreach Source Dropdown **/ - @FindBy(xpath = "//select[@id='outreach_source']") - public WebElement outreachSourceDropdown; - /** Country Dropdown **/ @FindBy(xpath = "//select[@id='country']") public WebElement countryDropdown; @@ -168,7 +172,39 @@ public CCRApplicationPage() { @FindBy(xpath = "//select[@id='business_country']") public WebElement countryBusinessDropdown; - /** Degree Dropdown **/ + /** Applicant Degree Dropdown **/ @FindBy(xpath = "//select[@id='degree']") public WebElement degreeDropdown; + + /** Reference Degree Dropdown **/ + @FindBy(xpath = "//select[@id='reference_0_degree']") + public WebElement referenceDegreeDropdown; + + /** Reference Degree M.D., Ph.D **/ + @FindBy(xpath = "(//option[contains(text(),' M.D., Ph.D.')])[2]") + public WebElement referenceDegreeMDPhD; + + /** Other Degree option**/ + @FindBy(xpath = "//option[contains(text(),'Other')]") + public WebElement degreeOther; + + /** upload Button for CV **/ + @FindBy(xpath = "(//div[@class='input-group-btn']//button[.=' Choose File '])[1]") + public WebElement uploadFileCV; + + /** upload Button for ResearchGoals **/ + @FindBy(xpath = "(//div[@class='input-group-btn']//button[.=' Choose File '])[2]") + public WebElement uploadFileResearchGoals; + + /** Confirmation message "The application has been submitted." **/ + @FindBy(xpath = "//p[.='The application has been submitted.']") + public WebElement msgApplicationSubmitted; + + /** CCR user dropdpown menu" **/ + @FindBy(xpath = "//li[@class='dropdown ng-scope']") + public WebElement userDropdownMenu; + + /** Log out option" **/ + @FindBy(xpath = "//ul[@class='dropdown-menu px-3 shadow-md']") + public WebElement optionLogOut; } diff --git a/src/test/java/CustomBusiness/CCR/Resources/ResearchGoals.docx b/src/test/java/CustomBusiness/CCR/Resources/ResearchGoals.docx new file mode 100644 index 000000000..ca64858ac Binary files /dev/null and b/src/test/java/CustomBusiness/CCR/Resources/ResearchGoals.docx differ diff --git a/src/test/java/CustomBusiness/CCR/Steps/AdminUserSteps.java b/src/test/java/CustomBusiness/CCR/Steps/AdminUserSteps.java new file mode 100644 index 000000000..9de9c353f --- /dev/null +++ b/src/test/java/CustomBusiness/CCR/Steps/AdminUserSteps.java @@ -0,0 +1,17 @@ +package CustomBusiness.CCR.Steps; + +import appsCommon.PageInitializers.PageInitializer; +import io.cucumber.java.en.Given; + +public class AdminUserSteps extends PageInitializer { + + @Given("Admin User deletes a newly created vacancy") + public void admin_user_deletes_a_newly_created_vacancy() { + cCRStepsImplementation.adminUserDeletesNewVacancy(); + } + + @Given("Admin User creates a new vacancy") + public void admin_user_creates_a_new_vacancy() { + cCRStepsImplementation.adminUserCreatesNewVacancy(); + } +} diff --git a/src/test/java/CustomBusiness/CCR/Steps/ApplicantUserSteps.java b/src/test/java/CustomBusiness/CCR/Steps/ApplicantUserSteps.java new file mode 100644 index 000000000..22af8fc04 --- /dev/null +++ b/src/test/java/CustomBusiness/CCR/Steps/ApplicantUserSteps.java @@ -0,0 +1,240 @@ +package CustomBusiness.CCR.Steps; + +import appsCommon.PageInitializers.PageInitializer; +import com.nci.automation.utils.MiscUtils; +import com.nci.automation.web.CommonUtils; +import com.nci.automation.xceptions.TestingException; +import io.cucumber.java.en.Given; +import java.awt.*; + +public class ApplicantUserSteps extends PageInitializer { + + @Given("User is on CCR Landing page and user is {string}") + public void user_is_on_ccr_landing_page_and_user_is(String user) { + switch (user) { + case "internal user": + cCRStepsImplementation.ccrApplicantLogin(); + break; + case "admin user": + cCRStepsImplementation.ccrAdminLogin(); + break; + } + } + + @Given("User can see {string} tab displayed") + public void user_can_see_tab_displayed(String tab) { + cCRStepsImplementation.verifyDisplayedTab(tab); + } + + @Given("User navigates to {string} open vacancy") + public void user_navigates_to_open_vacancy(String text) { + CommonUtils.clickOnElement(cCRDynamicXpaths.openVacancy(text)); + } + + @Given("User submits CCR Careers application") + public void user_submits_CCR_Careers_application() { + cCRStepsImplementation.submitApplication(); + MiscUtils.sleep(3000); + } + + @Given("User applies for that vacancy") + public void user_applies_for_that_vacancy() { + cCRStepsImplementation.clickApplyButton(); + MiscUtils.sleep(3000); + } + + @Given("User enters {string} into a first name field") + public void user_enters_into_a_first_name_field(String firstName) { + CommonUtils.waitForVisibility(cCRApplicantPage.firstNameField); + CommonUtils.sendKeys(cCRApplicantPage.firstNameField, firstName); + } + + @Given("User enter {string} into a middle name field") + public void user_enter_into_a_middle_name_field(String middleName) { + CommonUtils.waitForVisibility(cCRApplicantPage.middleNameField); + CommonUtils.sendKeys(cCRApplicantPage.middleNameField, middleName); + } + + @Given("User enters {string} into a last name field") + public void user_enters_into_a_last_name_field(String lastName) { + CommonUtils.waitForVisibility(cCRApplicantPage.lastNameField); + CommonUtils.sendKeys(cCRApplicantPage.lastNameField, lastName); + } + + @Given("User enters {string} into an email field") + public void user_enters_into_an_email_field(String email) { + CommonUtils.waitForVisibility(cCRApplicantPage.emailField); + CommonUtils.sendKeys(cCRApplicantPage.emailField, email); + } + + @Given("User enters {string} into a phone field") + public void user_enters_into_a_phone_field(String phone) { + CommonUtils.waitForVisibility(cCRApplicantPage.phoneField); + CommonUtils.sendKeys(cCRApplicantPage.phoneField, phone); + } + + @Given("User enters {string} into a business phone field") + public void user_enters_into_a_business_phone_field(String businessPhone) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessPhoneField); + CommonUtils.sendKeys(cCRApplicantPage.businessPhoneField, businessPhone); + } + + @Given("User selects Other from a degree dropdown") + public void user_selects_Other_from_a_degree_dropdown() { + CommonUtils.clickOnElement(cCRApplicantPage.degreeDropdown); + CommonUtils.clickOnElement(cCRApplicantPage.degreeOther); + } + + @Given("User selects M.D., Ph.D. from a reference degree dropdown") + public void user_selects_MD_PhD_from_a_reference_degree_dropdown() { + CommonUtils.clickOnElement(cCRApplicantPage.referenceDegreeDropdown); + CommonUtils.clickOnElement(cCRApplicantPage.referenceDegreeMDPhD); + } + + @Given("User enters {string} into an other degree field") + public void user_enters_into_an_other_degree_field(String otherDegrees) { + CommonUtils.waitForVisibility(cCRApplicantPage.otherDegreesField); + CommonUtils.sendKeys(cCRApplicantPage.otherDegreesField, otherDegrees); + } + + @Given("User confirms that User is a US Citizen") + public void user_confirms_that_user_is_a_us_citizen() { + CommonUtils.clickOnElement(cCRApplicantPage.yesUSCitizenOption); + } + + @Given("User enters {string} into an address field") + public void user_enters_into_an_address_field(String address) { + CommonUtils.waitForVisibility(cCRApplicantPage.addressField); + CommonUtils.sendKeys(cCRApplicantPage.addressField, address); + } + + @Given("User enters {string} into an address2 field") + public void user_enters_into_an_address2_field(String address2) { + CommonUtils.waitForVisibility(cCRApplicantPage.address2Field); + CommonUtils.sendKeys(cCRApplicantPage.address2Field, address2); + ; + } + + @Given("User enters {string} into a city field") + public void user_enters_into_a_city_field(String city) { + CommonUtils.waitForVisibility(cCRApplicantPage.cityField); + CommonUtils.sendKeys(cCRApplicantPage.cityField, city); + } + + @Given("User enters {string} into a state field") + public void user_enters_into_a_state_field(String state) { + CommonUtils.waitForVisibility(cCRApplicantPage.stateField); + CommonUtils.sendKeys(cCRApplicantPage.stateField, state); + } + + @Given("User enters {string} into a zip field") + public void user_enters_into_a_zip_field(String zip) { + CommonUtils.waitForVisibility(cCRApplicantPage.zipcodeField); + CommonUtils.sendKeys(cCRApplicantPage.zipcodeField, zip); + } + + @Given("User selects United States from a country dropdown for {string} section") + public void user_selects_united_states_from_a_country_dropdown_for_section(String country) throws TestingException { + cCRStepsImplementation.chooseUSA(country); + } + + @Given("User clicks Next button for {string} section") + public void user_clicks_next_button_for_section(String sectionName) throws TestingException { + cCRStepsImplementation.clickNextButton(sectionName); + } + + @Given("User enters {string} into a department field") + public void user_enters_into_a_department_field(String department) { + CommonUtils.waitForVisibility(cCRApplicantPage.departmentField); + CommonUtils.sendKeys(cCRApplicantPage.departmentField, department); + } + + @Given("User enters {string} into an institution field") + public void user_enters_into_an_institution_field(String institution) { + CommonUtils.waitForVisibility(cCRApplicantPage.institutionField); + CommonUtils.sendKeys(cCRApplicantPage.institutionField, institution); + } + + @Given("User enters {string} into a business address field") + public void user_enters_into_a_business_address_field(String businessAddress) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessAddressField); + CommonUtils.sendKeys(cCRApplicantPage.businessAddressField, businessAddress); + } + + @Given("User enters {string} into a business address2 field") + public void user_enters_into_a_business_address2_field(String businessAddress2) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessAddress2Field); + CommonUtils.sendKeys(cCRApplicantPage.businessAddress2Field, businessAddress2); + } + + @Given("User enters {string} into a business city field") + public void user_enters_into_a_business_city_field(String businessCity) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessCityField); + CommonUtils.sendKeys(cCRApplicantPage.businessCityField, businessCity); + } + + @Given("User enters {string} into a business state field") + public void user_enters_into_a_business_state_field(String businessState) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessStateField); + CommonUtils.sendKeys(cCRApplicantPage.businessStateField, businessState); + } + + @Given("User enters {string} into a business zip field") + public void user_enters_into_a_business_zip_field(String businessZip) { + CommonUtils.waitForVisibility(cCRApplicantPage.businessZipField); + CommonUtils.sendKeys(cCRApplicantPage.businessZipField, businessZip); + } + + @Given("User uploads {string} document") + public void user_uploads_document_as(String document) throws AWTException { + cCRStepsImplementation.uploadDocuments(document); + } + + @Given("User selects an outreach source as {string}") + public void user_selects_an_outreach_source_as(String source) { + cCRStepsImplementation.selectOutreachSource(source); + } + + @Given("User selects {string} for the question on simplicity of uploading application materials") + public void user_selects_for_the_question_on_simplicity_of_uploading_application_materials(String option) { + cCRStepsImplementation.selectUploadingMaterialsOption(option); + } + + @Given("User selects {string} for the question on whether the ad posted on the website contains enough information to decide on applying for a job") + public void user_selects_for_the_question_on_whether_the_ad_posted_on_the_website_contains_enough_information_to_decide_on_applying_for_a_job( + String option) { + cCRStepsImplementation.selectAdInformationOption(option); + } + + @Given("User inputs {string} in the changing process text field") + public void user_inputs_in_the_changing_process_text_field(String text) { + CommonUtils.waitForVisibility(cCRApplicantPage.textFieldSuggestions); + CommonUtils.sendKeys(cCRApplicantPage.textFieldSuggestions, text); + } + + @Given("User logs out of CCR application") + public void user_logs_out_of_ccr_application() { + cCRStepsImplementation.logOutOfCCRCareersApp(); + } + + @Given("User enters {string} into a reference First name field") + public void user_enters_into_a_reference_first_name_field(String referenceFirstName) { + CommonUtils.waitForVisibility(cCRApplicantPage.refFirstNameField); + CommonUtils.sendKeys(cCRApplicantPage.refFirstNameField, referenceFirstName); + } + @Given("User enters {string} into a reference Last name field") + public void user_enters_into_a_reference_last_name_field(String referenceLastName) { + CommonUtils.waitForVisibility(cCRApplicantPage.refLastNameField); + CommonUtils.sendKeys(cCRApplicantPage.refLastNameField, referenceLastName); + } + @Given("User enters {string} into a reference Email field") + public void user_enters_into_a_reference_email_field(String referenceEmail) { + CommonUtils.waitForVisibility(cCRApplicantPage.refEmailField); + CommonUtils.sendKeys(cCRApplicantPage.refEmailField, referenceEmail); + } + @Given("User enters {string} into a reference Phone Number field") + public void user_enters_into_a_reference_phone_number_field(String referencePhoneNumber) { + CommonUtils.waitForVisibility(cCRApplicantPage.refPhoneNumberField); + CommonUtils.sendKeys(cCRApplicantPage.refPhoneNumberField, referencePhoneNumber); + } +} diff --git a/src/test/java/CustomBusiness/CCR/Steps/InternalUserSteps.java b/src/test/java/CustomBusiness/CCR/Steps/InternalUserSteps.java deleted file mode 100644 index dc348e314..000000000 --- a/src/test/java/CustomBusiness/CCR/Steps/InternalUserSteps.java +++ /dev/null @@ -1,195 +0,0 @@ -package CustomBusiness.CCR.Steps; - -import appsCommon.PageInitializers.PageInitializer; -import com.nci.automation.web.CommonUtils; -import com.nci.automation.xceptions.TestingException; -import io.cucumber.java.en.Given; - -public class InternalUserSteps extends PageInitializer { - - @Given("User is on CCR Landing page and user is {string}") - public void user_is_on_ccr_landing_page_and_user_is(String user) throws TestingException { - switch (user) { - case "internal user": - cCRStepsImplementation.ccrLogin(); - break; - } - } - - @Given("User can see {string} tab displayed") - public void user_can_see_tab_displayed(String tab) { - cCRStepsImplementation.verifyDisplayedTab(tab); - } - - @Given("User navigates to {string} open vacancy") - public void user_navigates_to_open_vacancy(String text) { - CommonUtils.clickOnElement(cCRDynamicXpaths.openVacancy(text)); - } - - @Given("User clicks {string} button") - public void user_clicks_button(String button) { - cCRStepsImplementation.clickButton(button); - } - - @Given("User enters {string} into a first name field") - public void user_enters_into_a_first_name_field(String firstName) { - CommonUtils.waitForVisibility(cCRApplicationPage.firstNameField); - CommonUtils.sendKeys(cCRApplicationPage.firstNameField, firstName); - } - - @Given("User enter {string} into a middle name field") - public void user_enter_into_a_middle_name_field(String middleName) { - CommonUtils.waitForVisibility(cCRApplicationPage.middleNameField); - CommonUtils.sendKeys(cCRApplicationPage.middleNameField, middleName); - } - - @Given("User enters {string} into a last name field") - public void user_enters_into_a_last_name_field(String lastName) { - CommonUtils.waitForVisibility(cCRApplicationPage.lastNameField); - CommonUtils.sendKeys(cCRApplicationPage.lastNameField, lastName); - } - - @Given("User enters {string} into an email field") - public void user_enters_into_an_email_field(String email) { - CommonUtils.waitForVisibility(cCRApplicationPage.emailField); - CommonUtils.sendKeys(cCRApplicationPage.emailField, email); - } - - @Given("User enters {string} into a phone field") - public void user_enters_into_a_phone_field(String phone) { - CommonUtils.waitForVisibility(cCRApplicationPage.phoneField); - CommonUtils.sendKeys(cCRApplicationPage.phoneField, phone); - } - - @Given("User enters {string} into a business phone field") - public void user_enters_into_a_business_phone_field(String businessPhone) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessPhoneField); - CommonUtils.sendKeys(cCRApplicationPage.businessPhoneField, businessPhone); - } - - @Given("User selects {string} from a degree dropdown") - public void user_selects_from_a_degree_dropdown(String phd) { - CommonUtils.selectDropDownValue(" Ph.D. ", cCRApplicationPage.degreeDropdown); - } - - @Given("User enters {string} into an other degree field") - public void user_enters_into_an_other_degree_field(String otherDegrees) { - CommonUtils.waitForVisibility(cCRApplicationPage.otherDegreesField); - CommonUtils.sendKeys(cCRApplicationPage.otherDegreesField, otherDegrees); - } - - @Given("User confirms that User is a US Citizen") - public void user_confirms_that_user_is_a_us_citizen() { - CommonUtils.clickOnElement(cCRApplicationPage.yesUSCitizenOption); - } - - @Given("User enters {string} into an address field") - public void user_enters_into_an_address_field(String address) { - CommonUtils.waitForVisibility(cCRApplicationPage.addressField); - CommonUtils.sendKeys(cCRApplicationPage.addressField, address); - } - - @Given("User enters {string} into an address2 field") - public void user_enters_into_an_address2_field(String address2) { - CommonUtils.waitForVisibility(cCRApplicationPage.address2Field); - CommonUtils.sendKeys(cCRApplicationPage.address2Field, address2); - ; - } - - @Given("User enters {string} into a city field") - public void user_enters_into_a_city_field(String city) { - CommonUtils.waitForVisibility(cCRApplicationPage.cityField); - CommonUtils.sendKeys(cCRApplicationPage.cityField, city); - } - - @Given("User enters {string} into a state field") - public void user_enters_into_a_state_field(String state) { - CommonUtils.waitForVisibility(cCRApplicationPage.stateField); - CommonUtils.sendKeys(cCRApplicationPage.stateField, state); - } - - @Given("User enters {string} into a zip field") - public void user_enters_into_a_zip_field(String zip) { - CommonUtils.waitForVisibility(cCRApplicationPage.zipcodeField); - CommonUtils.sendKeys(cCRApplicationPage.zipcodeField, zip); - } - - @Given("User selects United States from a country dropdown for {string} section") - public void user_selects_united_states_from_a_country_dropdown_for_section(String country) throws TestingException { - cCRStepsImplementation.chooseUSA(country); - } - - @Given("User clicks Next button for {string} section") - public void user_clicks_next_button_for_section(String sectionName) throws TestingException { - cCRStepsImplementation.clickNextButton(sectionName); - } - - @Given("User enters {string} into a department field") - public void user_enters_into_a_department_field(String department) { - CommonUtils.waitForVisibility(cCRApplicationPage.departmentField); - CommonUtils.sendKeys(cCRApplicationPage.departmentField, department); - } - - @Given("User enters {string} into an institution field") - public void user_enters_into_an_institution_field(String institution) { - CommonUtils.waitForVisibility(cCRApplicationPage.institutionField); - CommonUtils.sendKeys(cCRApplicationPage.institutionField, institution); - } - - @Given("User enters {string} into a business address field") - public void user_enters_into_a_business_address_field(String businessAddress) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessAddressField); - CommonUtils.sendKeys(cCRApplicationPage.businessAddressField, businessAddress); - } - - @Given("User enters {string} into a business address2 field") - public void user_enters_into_a_business_address2_field(String businessAddress2) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessAddress2Field); - CommonUtils.sendKeys(cCRApplicationPage.businessAddress2Field, businessAddress2); - } - - @Given("User enters {string} into a business city field") - public void user_enters_into_a_business_city_field(String businessCity) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessCityField); - CommonUtils.sendKeys(cCRApplicationPage.businessCityField, businessCity); - } - - @Given("User enters {string} into a business state field") - public void user_enters_into_a_business_state_field(String businessState) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessStateField); - CommonUtils.sendKeys(cCRApplicationPage.businessStateField, businessState); - } - - @Given("User enters {string} into a business zip field") - public void user_enters_into_a_business_zip_field(String businessZip) { - CommonUtils.waitForVisibility(cCRApplicationPage.businessZipField); - CommonUtils.sendKeys(cCRApplicationPage.businessZipField, businessZip); - } - - @Given("User uploads {string} document") - public void user_uploads_document(String document) throws TestingException { - cCRStepsImplementation.uploadDocuments(document); - } - - @Given("User selects an outreach source as {string}") - public void user_selects_an_outreach_source_as(String source) { - cCRStepsImplementation.selectOutreachSource(source); - } - - @Given("User selects {string} for the question on simplicity of uploading application materials") - public void user_selects_for_the_question_on_simplicity_of_uploading_application_materials(String option) { - cCRStepsImplementation.selectUploadingMaterialsOption(option); - } - - @Given("User selects {string} for the question on whether the ad posted on the website contains enough information to decide on applying for a job") - public void user_selects_for_the_question_on_whether_the_ad_posted_on_the_website_contains_enough_information_to_decide_on_applying_for_a_job( - String option) { - cCRStepsImplementation.selectAdInformationOption(option); - } - - @Given("User inputs {string} in the changing process text field") - public void user_inputs_in_the_changing_process_text_field(String text) { - CommonUtils.waitForVisibility(cCRApplicationPage.textFieldSuggestions); - CommonUtils.sendKeys(cCRApplicationPage.textFieldSuggestions, text); - } -} \ No newline at end of file diff --git a/src/test/java/CustomBusiness/CCR/StepsImplementation/CCRStepsImplementation.java b/src/test/java/CustomBusiness/CCR/StepsImplementation/CCRStepsImplementation.java index b8c32281a..7c6b36b2d 100644 --- a/src/test/java/CustomBusiness/CCR/StepsImplementation/CCRStepsImplementation.java +++ b/src/test/java/CustomBusiness/CCR/StepsImplementation/CCRStepsImplementation.java @@ -1,73 +1,93 @@ package CustomBusiness.CCR.StepsImplementation; import CustomBusiness.CCR.Constants.CCR_CONSTANTS; +import ServiceNow.PlatformBusinessApps.NERD.Constants.NCI_Staff_Members_Constants; +import ServiceNow.PlatformBusinessApps.SSJ.selenium.Constants.StadtmanVacanciesConstants; +import appsCommon.Utils.ServiceNow_Common_Methods; import appsCommon.Utils.ServiceNow_Login_Methods; import appsCommon.PageInitializers.PageInitializer; +import com.nci.automation.utils.CucumberLogUtils; import com.nci.automation.utils.MiscUtils; import com.nci.automation.web.CommonUtils; import com.nci.automation.web.EnvUtils; import com.nci.automation.web.JavascriptUtils; import com.nci.automation.web.WebDriverUtils; import com.nci.automation.xceptions.TestingException; -import org.openqa.selenium.WebElement; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.Select; +import java.awt.*; +import java.awt.datatransfer.StringSelection; +import java.awt.event.KeyEvent; public class CCRStepsImplementation extends PageInitializer { - public void ccrLogin(){ + public void ccrApplicantLogin(){ ServiceNow_Login_Methods.nativeViewSideDoorLogin(); + ServiceNow_Common_Methods.impersonate_Any_User_Without_Landing_In_Native_View((CCR_CONSTANTS.APPLICANT)); WebDriverUtils.webDriver.get(EnvUtils.getApplicationUrl("CCR")); + CucumberLogUtils.logScreenshot(); } - public void clickNextButton(String sectionName) throws TestingException { + public void ccrAdminLogin(){ + ServiceNow_Login_Methods.nativeViewSideDoorLogin(); + ServiceNow_Common_Methods.impersonate_Any_User_Without_Landing_In_Native_View((CCR_CONSTANTS.ADMIN)); + WebDriverUtils.webDriver.get(EnvUtils.getApplicationUrl("CCR")); + CucumberLogUtils.logScreenshot(); + } + + public void clickNextButton(String sectionName) { switch (sectionName) { case "Basic Information": - CommonUtils.waitForVisibility(cCRApplicationPage.nextButtonBasicInfoSection); - CommonUtils.clickOnElement(cCRApplicationPage.nextButtonBasicInfoSection); + CommonUtils.waitForVisibility(cCRApplicantPage.nextButtonBasicInfoSection); + CommonUtils.clickOnElement(cCRApplicantPage.nextButtonBasicInfoSection); break; case "Address": - CommonUtils.waitForVisibility(cCRApplicationPage.nextButtonAddressSection); - CommonUtils.clickOnElement(cCRApplicationPage.nextButtonAddressSection); + CommonUtils.waitForVisibility(cCRApplicantPage.nextButtonAddressSection); + CommonUtils.clickOnElement(cCRApplicantPage.nextButtonAddressSection); + break; + case "Reference": + CommonUtils.waitForVisibility(cCRApplicantPage.nextButtonReferenceSection); + CommonUtils.clickOnElement(cCRApplicantPage.nextButtonReferenceSection); break; case "Business Address": - CommonUtils.waitForVisibility(cCRApplicationPage.nextButtonBusinessAddressSection); - CommonUtils.clickOnElement(cCRApplicationPage.nextButtonBusinessAddressSection); + CommonUtils.waitForVisibility(cCRApplicantPage.nextButtonBusinessAddressSection); + CommonUtils.clickOnElement(cCRApplicantPage.nextButtonBusinessAddressSection); break; case "Required Documents": - CommonUtils.waitForVisibility(cCRApplicationPage.nextButtonRequiredDocumentsSection); - CommonUtils.clickOnElement(cCRApplicationPage.nextButtonRequiredDocumentsSection); + CommonUtils.waitForVisibility(cCRApplicantPage.nextButtonRequiredDocumentsSection); + CommonUtils.clickOnElement(cCRApplicantPage.nextButtonRequiredDocumentsSection); break; } } - public void chooseUSA(String sectionName) throws TestingException { + public void chooseUSA(String sectionName) { switch (sectionName) { case "Address": - Select se = new Select(cCRApplicationPage.countryDropdown); + Select se = new Select(cCRApplicantPage.countryDropdown); se.selectByValue("060f782fdb51f30054d8ff621f96190a"); break; case "Business Address": - Select s = new Select(cCRApplicationPage.countryBusinessDropdown); + Select s = new Select(cCRApplicantPage.countryBusinessDropdown); s.selectByValue("060f782fdb51f30054d8ff621f96190a"); break; } } - public void uploadDocuments(String document){ + public void uploadDocuments(String document) throws AWTException { switch (document) { - case "Letter of Interest": - MiscUtils.sleep(2000); - System.out.println("method"); - JavascriptUtils.scrollIntoView(cCRApplicationPage.uploadFile1); - CommonUtils.sendKeys(cCRApplicationPage.uploadFile1,"text"); - break; - case "CV/Bibliography": - MiscUtils.sleep(2000); - CommonUtils.sendKeys(cCRApplicationPage.uploadFile1,CCR_CONSTANTS.CV); - break; - case "Upload Diversity Statement": - WebElement uploadFile3 = cCRApplicationPage.uploadFile3; - uploadFile3.sendKeys(CCR_CONSTANTS.DIVERSITY_STATEMENT); + case "CV": + CommonUtils.clickOnElement((cCRApplicantPage.uploadFileCV)); + setClipboardData(CCR_CONSTANTS.CV); + MiscUtils.sleep(1000); + enterFilePathCloseWindowDialogue(); + break; + case "Research Goals": + CommonUtils.clickOnElement((cCRApplicantPage.uploadFileResearchGoals)); + setClipboardData(CCR_CONSTANTS.RESEARCH_GOALS); + MiscUtils.sleep(1000); + enterFilePathCloseWindowDialogue(); break; } } @@ -75,35 +95,35 @@ public void uploadDocuments(String document){ public void selectOutreachSource(String source){ switch (source) { case "Contacted By Member": - Select s1 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s1 = new Select(webDriver.findElement(By.id("outreach_source"))); s1.selectByVisibleText(" Directly contacted by a member of the search committee or an NCI employee. "); break; case "Colleague": - Select s2 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s2 = new Select(webDriver.findElement(By.id("outreach_source"))); s2.selectByVisibleText(" Advisor/colleague in my current organization. If known, please indicate how they found out. "); break; case "Internet Search": - Select s3 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s3 = new Select(webDriver.findElement(By.id("outreach_source"))); s3.selectByVisibleText(" Internet/Google search. Please indicate keywords used. "); break; case "Social Media": - Select s4 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s4 = new Select(webDriver.findElement(By.id("outreach_source"))); s4.selectByVisibleText(" CCR social media, including Facebook, Twitter, Instagram, Linkedin. Please indicate which specifically. "); break; case "Online Journal": - Select s5 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s5 = new Select(webDriver.findElement(By.id("outreach_source"))); s5.selectByVisibleText(" On-line journal advertisement or career fair. Please identify which journal/meeting. "); break; case "GMPAP": - Select s6 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s6 = new Select(webDriver.findElement(By.id("outreach_source"))); s6.selectByVisibleText(" Geographic Management of Cancer Health Disparities Program (GMaP). "); break; case "Other": - Select s7 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s7 = new Select(webDriver.findElement(By.id("outreach_source"))); s7.selectByVisibleText(" Other (please specify) "); break; case "Don't recall": - Select s8 = new Select(cCRApplicationPage.outreachSourceDropdown); + Select s8 = new Select(webDriver.findElement(By.id("outreach_source"))); s8.selectByVisibleText(" Don't recall. "); break; } @@ -112,10 +132,10 @@ public void selectOutreachSource(String source){ public void selectUploadingMaterialsOption(String option) { switch (option) { case "Yes": - CommonUtils.clickOnElement(cCRApplicationPage.yesOptionSimplicityOfUploadingMaterials); + CommonUtils.clickOnElement(cCRApplicantPage.yesOptionSimplicityOfUploadingMaterials); break; case "No": - CommonUtils.clickOnElement(cCRApplicationPage.noOptionSimplicityOfUploadingMaterials); + CommonUtils.clickOnElement(cCRApplicantPage.noOptionSimplicityOfUploadingMaterials); break; } } @@ -123,30 +143,30 @@ public void selectUploadingMaterialsOption(String option) { public void selectAdInformationOption(String option){ switch (option) { case "Yes": - CommonUtils.clickOnElement(cCRApplicationPage.yesPostedAd); + CommonUtils.clickOnElement(cCRApplicantPage.yesPostedAd); break; case "No": - CommonUtils.clickOnElement(cCRApplicationPage.noPostedAd); + CommonUtils.clickOnElement(cCRApplicantPage.noPostedAd); break; } } - public void clickButton(String button){ - switch (button) { - case "Apply Now": - CommonUtils.waitForClickability(cCRApplicationPage.applyNowButton); - CommonUtils.clickOnElement(cCRApplicationPage.applyNowButton); - break; - case "Submit": - CommonUtils.waitForVisibility(cCRApplicationPage.submitButton); - CommonUtils.clickOnElement(cCRApplicationPage.submitButton); - CommonUtils.waitForVisibility(cCRApplicationPage.submitConfirmationButton); - CommonUtils.clickOnElement(cCRApplicationPage.submitConfirmationButton); - CommonUtils.waitForVisibility(cCRApplicationPage.closeApplicationSubmittedButton); - CommonUtils.clickOnElement(cCRApplicationPage.closeApplicationSubmittedButton); - break; - } + public void submitApplication(){ + CommonUtils.waitForVisibility(cCRApplicantPage.submitButton); + CommonUtils.clickOnElement(cCRApplicantPage.submitButton); + CommonUtils.waitForVisibility(cCRApplicantPage.submitConfirmationButton); + CommonUtils.clickOnElement(cCRApplicantPage.submitConfirmationButton); + MiscUtils.sleep(1000); + Assert.assertTrue(" User failed to submit application", cCRApplicantPage.msgApplicationSubmitted.isDisplayed()); + CommonUtils.waitForVisibility(cCRApplicantPage.closeApplicationSubmittedButton); + CommonUtils.clickOnElement(cCRApplicantPage.closeApplicationSubmittedButton); } + + public void clickApplyButton(){ + CommonUtils.waitForClickability(cCRApplicantPage.applyNowButton); + CommonUtils.clickOnElement(cCRApplicantPage.applyNowButton); + } + public void verifyDisplayedTab(String tab) { if (tab.equals ("Home")) { CommonUtils.waitForVisibility(cCRLandingPage.homeTab); @@ -156,4 +176,70 @@ public void verifyDisplayedTab(String tab) { CommonUtils.assertTrue(cCRLandingPage.positionsTab.isDisplayed()); } } + + public static void setClipboardData(String string) { + StringSelection stringSelection = new StringSelection(string); + Toolkit.getDefaultToolkit().getSystemClipboard().setContents(stringSelection, null); + } + + public static void enterFilePathCloseWindowDialogue() throws AWTException { + Robot robot = new Robot(); + robot.delay(1000); + robot.keyPress(KeyEvent.VK_CONTROL); + robot.keyPress(KeyEvent.VK_V); + robot.keyRelease(KeyEvent.VK_V); + robot.keyRelease(KeyEvent.VK_CONTROL); + robot.keyPress(KeyEvent.VK_ENTER); + robot.keyRelease(KeyEvent.VK_ENTER); + robot.delay(1000); + } + + public void logOutOfCCRCareersApp(){ + CommonUtils.waitForVisibility(cCRApplicantPage.userDropdownMenu); + CommonUtils.clickOnElement(cCRApplicantPage.userDropdownMenu); + CommonUtils.waitForVisibility(cCRApplicantPage.optionLogOut); + CommonUtils.clickOnElement(cCRApplicantPage.optionLogOut); + } + + public void adminUserCreatesNewVacancy(){ + CommonUtils.waitForVisibility(cCRAdminUserPage.tabPositions); + CommonUtils.clickOnElement(cCRAdminUserPage.tabPositions); + CommonUtils.waitForVisibility(cCRAdminUserPage.buttonAddPosition); + CommonUtils.clickOnElement(cCRAdminUserPage.buttonAddPosition); + CommonUtils.waitForVisibility(cCRAdminUserPage.fieldPositionTitle); + CommonUtils.sendKeys(cCRAdminUserPage.fieldPositionTitle, "Chief Technical Officer"); + MiscUtils.sleep(2000); + CommonUtils.switchToFrame(createNewSubmissionPage.DescriptionTextBoxIframe); + MiscUtils.sleep(1000); + CommonUtils.sendKeys(cCRAdminUserPage.fieldDescription, "Added description"); + MiscUtils.sleep(2000); + WebDriverUtils.webDriver.switchTo().defaultContent(); + JavascriptUtils.scrollIntoView(cCRAdminUserPage.openDateCalendar); + CommonUtils.clickOnElement(cCRAdminUserPage.openDateCalendar); + CommonUtils.clickOnElement(cCRAdminUserPage.todaysDateActiveField); + MiscUtils.sleep(2000); + Select s = new Select(webDriver.findElement(By.id("number_of_references"))); + s.selectByVisibleText("1"); + clickOutside(); + MiscUtils.sleep(2000); + CommonUtils.clickOnElement(cCRAdminUserPage.buttonSaveNewPosition); + } + + public void adminUserDeletesNewVacancy(){ + CommonUtils.waitForVisibility(cCRAdminUserPage.tabPositions); + CommonUtils.clickOnElement(cCRAdminUserPage.tabPositions); + CommonUtils.waitForVisibility(cCRAdminUserPage.buttonRemoveNewlyCreatedPosition); + CommonUtils.clickOnElement(cCRAdminUserPage.buttonRemoveNewlyCreatedPosition); + MiscUtils.sleep(2000); + CommonUtils.clickOnElement(cCRAdminUserPage.buttonOkRemovingPositionModal); + MiscUtils.sleep(2000); + Assert.assertTrue("Position was NOT removed",cCRAdminUserPage.confirmationMessagePositionWasRemoved.isDisplayed()); + MiscUtils.sleep(2000); + CommonUtils.clickOnElement(cCRAdminUserPage.acknowledgeConfirmationModalPositionWasRemoved); + } + + public void clickOutside(){ + Actions action = new Actions(webDriver); + action.moveByOffset(0, 0).click().build().perform(); + } } diff --git a/src/test/java/appsCommon/PageInitializers/PageInitializer.java b/src/test/java/appsCommon/PageInitializers/PageInitializer.java index 0a3114fd5..eb9a9f19d 100644 --- a/src/test/java/appsCommon/PageInitializers/PageInitializer.java +++ b/src/test/java/appsCommon/PageInitializers/PageInitializer.java @@ -332,7 +332,8 @@ public class PageInitializer extends WebDriverUtils { public static CCRLandingPage cCRLandingPage; public static CCRStepsImplementation cCRStepsImplementation; public static CCRDynamicXpaths cCRDynamicXpaths; - public static CCRApplicationPage cCRApplicationPage; + public static CCRApplicantPage cCRApplicantPage; + public static CCRAdminUserPage cCRAdminUserPage; /** ESR INSTANCES */ public static NCINativeViewPage nciNativeViewPage; @@ -612,7 +613,8 @@ public static void initializeAllPages() { cCRStepsImplementation = new CCRStepsImplementation(); cCRStepsImplementation = new CCRStepsImplementation(); cCRDynamicXpaths = new CCRDynamicXpaths(); - cCRApplicationPage = new CCRApplicationPage(); + cCRApplicantPage = new CCRApplicantPage(); + cCRAdminUserPage = new CCRAdminUserPage(); /** --------------- NATIVE VIEW INSTANCE VARIABLES --------------- */ nativeViewHomePage = new NativeViewHomePage();