Skip to content

Commit

Permalink
Merge pull request #340 from CBIIT/muzipovay2
Browse files Browse the repository at this point in the history
CHARMS - Verifying fields in NV Participant Studies
  • Loading branch information
Mariachaudhry authored Dec 10, 2024
2 parents 215be7a + 9987f77 commit f2b3b9b
Show file tree
Hide file tree
Showing 11 changed files with 634 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CHARMS - Fanconi Regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fetch-depth: 0

- name: Run specific runner class
run: mvn -B -q -Dtest="ServiceNow.CHARMS.Runners.Run_CHARMS_Fanconi_Regression_Test" test
run: mvn -B -q -Dtest="CHARMS.Runners.Run_CHARMS_Fanconi_Regression_Test" test
continue-on-error: true

- name: Generate timestamp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CHARMS - RAS Regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Run specific runner class
run: mvn -B -q -Dtest="ServiceNow.CHARMS.Runners.Run_CHARMS_RAS_Regression_Test" test
run: mvn -B -q -Dtest="CHARMS.Runners.Run_CHARMS_RAS_Regression_Test" test
continue-on-error: true

- name: Generate timestamp
Expand Down
13 changes: 12 additions & 1 deletion src/test/java/APPS_COMMON/Pages/Selenium_Common_Locators.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import java.util.List;
import static com.nci.automation.web.WebDriverUtils.webDriver;

public class Selenium_Common_Locators {
Expand All @@ -11,10 +12,20 @@ public class Selenium_Common_Locators {
*
* @param xpath the XPath expression used to locate the element
*/
public static WebElement locateByXpath(String xpath){
public static WebElement locateByXpath(String xpath) {
return webDriver.findElement(By.xpath(xpath));
}

/**
* Locates multiple web elements on the web page using the provided XPath expression.
*
* @param xpath the XPath expression used to locate the elements
* @return a list of WebElement objects located by the XPath expression
*/
public static List<WebElement> locateElementsByXpath(String xpath) {
return webDriver.findElements(By.xpath(xpath));
}

/**
* Locates an element in the web page using the provided CSS selector.
*
Expand Down
28 changes: 14 additions & 14 deletions src/test/java/CHARMS/Constants/CHARMS_Data_File_Path_Constants.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package CHARMS.Constants;

public class CHARMS_Data_File_Path_Constants {
public static final String RAS_SURVEY = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RasSurveySelfSubmission.xlsx";
public static final String RAS_SURVEY_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RasSurveyDataVerificationTableData.xlsx";
public static final String RAS_SCENARIO_ONE_DATA = "src/test/java/ServiceNow/CHARMS/Resources/RASScenario1.xlsx";
public static final String RAS_SCENARIO_TWO_DATA = "src/test/java/ServiceNow/CHARMS/Resources/RASScenario2.xlsx";
public static final String RAS_SURVEY = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RasSurveySelfSubmission.xlsx";
public static final String RAS_SURVEY_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RasSurveyDataVerificationTableData.xlsx";
public static final String RAS_SCENARIO_ONE_DATA = "src/test/java/CHARMS/Resources/RASScenario1.xlsx";
public static final String RAS_SCENARIO_TWO_DATA = "src/test/java/CHARMS/Resources/RASScenario2.xlsx";
public static final String RAS_SCENARIO_THREE_DATA = "DEPRECATED/CHARMS/Resources/RASScenario3.xlsx";
public static final String RAS_SCENARIO_FOUR_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario4.xlsx";
public static final String RAS_SCENARIO_FIVE_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/GenAIData/Gen_AI_Data_Set_1.xlsx";
public static final String RAS_SCENARIO_AGE_UNDER_7 = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Age_Under-7.xlsx";
public static final String RAS_SCENARIO_AGE_7_10_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Age_7-10.xlsx";
public static final String RAS_SCENARIO_AGE_11_13_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Age_11-13.xlsx";
public static final String RAS_SCENARIO_AGE_14_17_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Age_14-17.xlsx";
public static final String RAS_SCENARIO_ADULT_NEEDS_LAR = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Adult_Needs_LAR.xlsx";
public static final String RAS_SCENARIO_ADULT = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/RASScenario_Consent_Adult.xlsx";
public static final String RAS_SCENARIO_FOUR_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario4.xlsx";
public static final String RAS_SCENARIO_FIVE_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/GenAIData/Gen_AI_Data_Set_1.xlsx";
public static final String RAS_SCENARIO_AGE_UNDER_7 = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Age_Under-7.xlsx";
public static final String RAS_SCENARIO_AGE_7_10_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Age_7-10.xlsx";
public static final String RAS_SCENARIO_AGE_11_13_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Age_11-13.xlsx";
public static final String RAS_SCENARIO_AGE_14_17_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Age_14-17.xlsx";
public static final String RAS_SCENARIO_ADULT_NEEDS_LAR = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Adult_Needs_LAR.xlsx";
public static final String RAS_SCENARIO_ADULT = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/RASScenario_Consent_Adult.xlsx";
public static final String IIQ_SAMPLE_FORM = "https://ncidccpssurveys.gov1.qualtrics.com/jfe/form/SV_37PVCadeAqdT6Ki?family_member_id=5671bd521bafa1106daea681f54bcb68&study=RASopathies";
public static final String FHQ_SCENARIO_ONE_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/FHQScenario1.xlsx";
public static final String FHQ_SCENARIO_TWO_DATA = System.getProperty("user.dir") + "/src/test/java/ServiceNow/CHARMS/Resources/FHQScenario2.xlsx";
public static final String FHQ_SCENARIO_ONE_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/FHQScenario1.xlsx";
public static final String FHQ_SCENARIO_TWO_DATA = System.getProperty("user.dir") + "/src/test/java/CHARMS/Resources/FHQScenario2.xlsx";
}
Loading

0 comments on commit f2b3b9b

Please sign in to comment.