Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
package automation.Pages;
import java.util.List;
import java.util.Set;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Point;
import org.openqa.selenium.UnhandledAlertException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import automation.ExplorerSuite;
import automation.SharedCodeClass;
public class EDI_PDI_QuickView extends ExplorerSuite {
private String pdiNumberDentalClaim = "200617203000952";
// private String pdiNumberProfessionalClaim = "200617203000825";
private String pdiNumberProfessionalClaim = "100000000001800";
// private String pdiNumberInstitutionalClaim = "200617203000832";
private String pdiNumberInstitutionalClaim = "201722991001691";
public void localRunner() throws Exception {
System.out.println("Inside of EDI_PDI_QuickView.localRunner()!");
goToEdiWebViewerPage();
verifySectionHeadersPresentForDentalClaim();
verifyPatientInformation();
verifyVendorInformation();
verifyBillingInformationNonInstitutional();
verifyTopCommonBannerExistsAndRemainsStationaryWhenScrolling();
verifyHotKeysInformationPresent();
verifyPdfReferencesDropDown();
goToEdiWebViewerPage_v2();
verifySectionHeadersPresentForProfessionalClaim();
verifyPatientInformation();
verifyVendorInformation();
verifyBillingInformationNonInstitutional();
verifyTopCommonBannerExistsAndRemainsStationaryWhenScrolling();
verifyHotKeysInformationPresent();
// Wait until we find a Professional Claim that has Taxonomy Codes to un-comment below.
// verifyRenderingNameNpiTaxonomyInformationInBillingInformationServiceLines();
verifyPdfReferencesDropDown();
goToEdiWebViewerPage_v2();
verifySectionHeadersPresentForInstitutionalClaim();
verifyPatientInformation();
verifyVendorInformation();
verifyBillingInformationInstitutional();
verifyTopCommonBannerExistsAndRemainsStationaryWhenScrolling();
verifyHotKeysInformationPresent();
// Wait until we find a Professional Claim that has Taxonomy Codes to un-comment below.
// verifyRenderingNameNpiTaxonomyInformationInBillingInformationServiceLines();
verifyPdfReferencesDropDown();
goToEdiWebViewerPage_v2();
verifyPertinentPatientDataInMiddleBannerForDentalClaim();
goToEdiWebViewerPage_v2();
verifyPertinentPatientDataInMiddleBannerForProfessionalClaim();
goToEdiWebViewerPage_v2();
verifyPertinentPatientDataInMiddleBannerForInstitutionalClaim();
}
public void goToEdiWebViewerPage() throws Exception {
SharedCodeClass.clickById("NAV_ewvSearch_appNav_1");
Thread.sleep(4000);
SharedCodeClass.findElementId("HDG_ediWebViewer_ewvSearch_1");
SharedCodeClass.findElementId("IPT_pdiSearchNumber_ewvSearch_1");
SharedCodeClass.findElementId("BTN_pdiSearchRetrieve_ewvSearch_1");
SharedCodeClass.findElementId("BTN_pdiClear_ewvSearch_1");
}
public void goToEdiWebViewerPage_v2() throws Exception {
driver.get(baseUrl + "/ewvSearch");
Thread.sleep(4000);
SharedCodeClass.findElementId("HDG_ediWebViewer_ewvSearch_1");
SharedCodeClass.findElementId("IPT_pdiSearchNumber_ewvSearch_1");
SharedCodeClass.findElementId("BTN_pdiSearchRetrieve_ewvSearch_1");
SharedCodeClass.findElementId("BTN_pdiClear_ewvSearch_1");
}
public void verifyTopCommonBannerExistsAndRemainsStationaryWhenScrolling() throws Exception {
// Several Elements were chosen to test whether the Common Banner remains in the same location when
// scrolling takes place. Some of the elements are inside of the Common Banner and others are not.
// The Location of each element is taken both before abe after scrolling towards the end of the
// page is done. Ironically after doing some System.out.println statements, it was found that the
// elements that remained stationary on the screen actually had DIFFERENT Location Point values
// BEFORE and AFTER the scrolling towards the end, while those that moved had the SAME Location
// Point values. Strange but true!
// Inside Common Banner and should stay stationary.
WebElement headerElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv/div/header"));
// WebElement headerElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv2/div/header"));
Point headerElementBeforeScrollingLocation = headerElement.getLocation();
// Inside Common Banner and should stay stationary.
WebElement navElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv/div/nav"));
// WebElement navElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv2/div/nav"));
Point navElementBeforeScrollingLocation = navElement.getLocation();
// Inside Common Banner and should stay stationary.
WebElement stickyDivElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv/div/div[2]/div"));
// WebElement stickyDivElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv2/div/div[2]/div"));
Point stickyDivElementBeforeScrollingLocation = stickyDivElement.getLocation();
// Inside Common Banner and should stay stationary.
WebElement sectionElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv/div/div[2]/div/section"));
// WebElement sectionElement = driver.findElement(By.xpath("/html/body/app-root/app-ewv2/div/div[2]/div/section"));
Point sectionElementBeforeScrollingLocation = sectionElement.getLocation();
// Inside Common Banner and should stay stationary.
WebElement ediWebViewerHeaderElement = driver.findElement(By.id("HDG_ediWebViewer_ewv_1"));
Point ediWebViewerHeaderElementBeforeScrollingLocation = ediWebViewerHeaderElement.getLocation();
// Outside Common Banner and should move.
WebElement divQuickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
Point divQuickViewElementBeforeScrollingLocation = divQuickViewElement.getLocation();
// Outside Common Bannner and should move.
WebElement printIconWebElement = driver.findElement(By.id("IMG_printIcon_ewvMaster_1"));
Point printIconWebElementBeforeScrollingLocation = printIconWebElement.getLocation();
JavascriptExecutor js = (JavascriptExecutor) driver;
// This will scroll the web page till the end.
js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
Thread.sleep(2000);
Point headerElementAfterScrollingLocation = headerElement.getLocation();
Point navElementAfterScrollingLocation = headerElement.getLocation();
Point stickyDivElementAfterScrollingLocation = stickyDivElement.getLocation();
Point sectionElementAfterScrollingLocation = sectionElement.getLocation();
Point ediWebViewerHeaderElementAfterScrollingLocation = ediWebViewerHeaderElement.getLocation();
Point divQuickViewElementAfterScrollingLocation = divQuickViewElement.getLocation();
Point printIconWebElementAfterScrollingLocation = printIconWebElement.getLocation();
// System.out.println("headerElementBeforeScrollingLocation = " + headerElementBeforeScrollingLocation);
// System.out.println("headerElementAfterScrollingLocation = " + headerElementAfterScrollingLocation);
// System.out.println();
Assert.assertFalse("Header Element in Common Banner should have remained Stationary",
headerElementBeforeScrollingLocation.equals(headerElementAfterScrollingLocation));
// System.out.println("navElementBeforeScrollingLocation = " + navElementBeforeScrollingLocation);
// System.out.println("navElementAfterScrollingLocation = " + navElementAfterScrollingLocation);
// System.out.println();
Assert.assertFalse("Nav Element in Common Banner should have remained Stationary",
navElementBeforeScrollingLocation.equals(navElementAfterScrollingLocation));
// System.out.println("stickyDivElementBeforeScrollingLocation = " + stickyDivElementBeforeScrollingLocation);
// System.out.println("stickyDivElementAfterScrollingLocation = " + stickyDivElementAfterScrollingLocation);
// System.out.println();
Assert.assertFalse("Sticky Div Element in Common Banner should have remained Stationary",
stickyDivElementBeforeScrollingLocation.equals(stickyDivElementAfterScrollingLocation));
// System.out.println("sectionElementBeforeScrollingLocation = " + sectionElementBeforeScrollingLocation);
// System.out.println("sectionElementAfterScrollingLocation = " + sectionElementAfterScrollingLocation);
// System.out.println();
Assert.assertFalse("Section Element in Common Banner should have remained Stationary",
sectionElementBeforeScrollingLocation.equals(sectionElementAfterScrollingLocation));
// System.out.println("ediWebViewerHeaderElementBeforeScrollingLocation = " + ediWebViewerHeaderElementBeforeScrollingLocation);
// System.out.println("ediWebViewerHeaderElementAfterScrollingLocation = " + ediWebViewerHeaderElementAfterScrollingLocation);
// System.out.println();
Assert.assertFalse("EDI Web Viewer Header Element in Common Banner should have remained Stationary",
ediWebViewerHeaderElementBeforeScrollingLocation.equals(ediWebViewerHeaderElementAfterScrollingLocation));
// System.out.println("divQuickViewElementBeforeScrollingLocation = " + divQuickViewElementBeforeScrollingLocation);
// System.out.println("divQuickViewElementAfterScrollingLocation = " + divQuickViewElementAfterScrollingLocation);
// System.out.println();
Assert.assertTrue("DIV Quick View Element outside Common Banner should have NOT remained Stationary",
divQuickViewElementBeforeScrollingLocation.equals(divQuickViewElementAfterScrollingLocation));
// System.out.println("printIconWebElementBeforeScrollingLocation = " + printIconWebElementBeforeScrollingLocation);
// System.out.println("printIconWebElementAfterScrollingLocation = " + printIconWebElementAfterScrollingLocation);
Assert.assertTrue("Print Icon Element outside Common Banner should have NOT remained Stationary",
printIconWebElementBeforeScrollingLocation.equals(printIconWebElementAfterScrollingLocation));
// This will scroll the page all the way to the top.
js.executeScript("window.scrollTo(0, 0)");
}
public void retrieveClaimInformation(String pdiNumber) throws Exception {
SharedCodeClass.fillAllElementById("IPT_pdiSearchNumber_ewvSearch_1", pdiNumber);
Thread.sleep(1000);
SharedCodeClass.clickById("BTN_pdiSearchRetrieve_ewvSearch_1");
Thread.sleep(5000);
// The below element no longer exists.
// SharedCodeClass.findElementId("DIV_ediWebViewer_ewv_1");
// WebElement webElement = driver.findElement(By.id("DIV_ediWebViewer_ewv_1"));
// Assert.assertEquals("EDI Web Viewer / " + pdiNumber, webElement.getText());
SharedCodeClass.findElementId("HDG_ediWebViewer_ewv_1");
WebElement webElement = driver.findElement(By.id("HDG_ediWebViewer_ewv_1"));
// webElement = webElement.findElement(By.cssSelector("span"));
String expectedString = "EDI Web Viewer | " + pdiNumber;
// Assert.assertEquals(expectedString, webElement.getText());
Assert.assertTrue(webElement.getText().startsWith(expectedString));
}
public void verifySectionsHeadersPresent() throws Exception {
WebElement quickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
WebElement webElement = quickViewElement.findElement(By.id("LBL_title_patientInfo_1"));
Assert.assertEquals("Patient Information", webElement.getText());
// webElement = quickViewElement.findElement(By.id("LBL_vendorInformation_vendorInfo_1"));
webElement = quickViewElement.findElement(By.cssSelector("label[for='ACC_vendorInfo_ewv_1']"));
Assert.assertEquals("Vendor Information", webElement.getText());
// webElement = quickViewElement.findElement(By.id("LBL_title_billingInfo_1"));
webElement = quickViewElement.findElement(By.cssSelector("label[for='ACC_billingInfo_ewv_1']"));
Assert.assertEquals("Billing Information", webElement.getText());
webElement = quickViewElement.findElement(By.id("LBL_title_ohiInfo_1"));
Assert.assertEquals("Other Health Information (OHI)", webElement.getText());
webElement = quickViewElement.findElement(By.id("LBL_title_miscellaneousInfo_1"));
Assert.assertEquals("Miscellaneous", webElement.getText());
}
public void verifySectionHeadersPresentForDentalClaim() throws Exception {
retrieveClaimInformation(pdiNumberDentalClaim);
verifySectionsHeadersPresent();
}
public void verifySectionHeadersPresentForProfessionalClaim() throws Exception {
retrieveClaimInformation(pdiNumberProfessionalClaim);
verifySectionsHeadersPresent();
}
public void verifySectionHeadersPresentForInstitutionalClaim() throws Exception {
retrieveClaimInformation(pdiNumberInstitutionalClaim);
verifySectionsHeadersPresent();
}
public void verifyPertinentPatientDataInMiddleBanner() {
WebElement middleBannerTableWebElement = driver.findElement(By.id("TBL_headerInfo_ewv_1"));
List<WebElement> middleBannerTableColumnHeadersList = middleBannerTableWebElement.findElements(By.tagName("th"));
Assert.assertEquals("Middle Banner Table must have 8 columns!", 8, middleBannerTableColumnHeadersList.size());
// Check for the correct column names.
for (int i = 0; i < middleBannerTableColumnHeadersList.size(); i++) {
WebElement tableColumnHeader = middleBannerTableColumnHeadersList.get(i);
String correctColumnName = null;
if (i == 0) {
correctColumnName = "Submission Type:";
} else if (i == 1) {
correctColumnName = "Patient Name:";
} else if (i == 2) {
correctColumnName = "Member:";
} else if (i == 3) {
correctColumnName = "PDI:";
} else if (i == 4) {
correctColumnName = "Medicare Crossover:";
} else if (i == 5) {
correctColumnName = "Billing NPI:";
} else if (i == 6) {
correctColumnName = "TIN:";
} else if (i == 7) {
correctColumnName = "PCN:";
}
Assert.assertEquals(correctColumnName, tableColumnHeader.getText());
}
List<WebElement> middleBannerTableColumnDataList = middleBannerTableWebElement.findElements(By.tagName("td"));
Assert.assertEquals("Middle Banner Table Data must have 8 data items!", 8, middleBannerTableColumnDataList.size());
// Check for the correct column data values.
for (int i = 0; i < middleBannerTableColumnDataList.size(); i++) {
WebElement tableColumnData = middleBannerTableColumnDataList.get(i);
Assert.assertTrue("Data must exist for a Middle Banner Column Data!", tableColumnData.getText().length() > 0);
}
}
public void verifyPertinentPatientDataInMiddleBannerForDentalClaim() throws Exception {
retrieveClaimInformation(pdiNumberDentalClaim);
verifyPertinentPatientDataInMiddleBanner();
WebElement middleBannerTableWebElement = driver.findElement(By.id("TBL_headerInfo_ewv_1"));
List<WebElement> middleBannerTableColumnDataList = middleBannerTableWebElement.findElements(By.tagName("td"));
WebElement submissionTypeDataElement = middleBannerTableColumnDataList.get(0);
Assert.assertEquals("First character of Dental Claim Submission Type muust be a \"D\"!", "D",
submissionTypeDataElement.getText().substring(0, 1));
WebElement pdiDataElement = middleBannerTableColumnDataList.get(3);
String pdiNumberWithoutSpaces = pdiDataElement.getText().replaceAll("\\s+","");
Assert.assertEquals("PDI value does not contain PDI value of Dental Claim searched!", pdiNumberDentalClaim, pdiNumberWithoutSpaces);
}
public void verifyPertinentPatientDataInMiddleBannerForProfessionalClaim() throws Exception {
retrieveClaimInformation(pdiNumberProfessionalClaim);
verifyPertinentPatientDataInMiddleBanner();
WebElement middleBannerTableWebElement = driver.findElement(By.id("TBL_headerInfo_ewv_1"));
List<WebElement> middleBannerTableColumnDataList = middleBannerTableWebElement.findElements(By.tagName("td"));
WebElement submissionTypeDataElement = middleBannerTableColumnDataList.get(0);
Assert.assertEquals("First character of Professional Claim Submission Type muust be a \"P\"!", "P",
submissionTypeDataElement.getText().substring(0, 1));
WebElement pdiDataElement = middleBannerTableColumnDataList.get(3);
String pdiNumberWithoutSpaces = pdiDataElement.getText().replaceAll("\\s+","");
Assert.assertEquals("PDI value does not contain PDI value of Professional Claim searched!", pdiNumberProfessionalClaim,
pdiNumberWithoutSpaces);
}
public void verifyPertinentPatientDataInMiddleBannerForInstitutionalClaim() throws Exception {
retrieveClaimInformation(pdiNumberInstitutionalClaim);
verifyPertinentPatientDataInMiddleBanner();
WebElement middleBannerTableWebElement = driver.findElement(By.id("TBL_headerInfo_ewv_1"));
List<WebElement> middleBannerTableColumnDataList = middleBannerTableWebElement.findElements(By.tagName("td"));
WebElement submissionTypeDataElement = middleBannerTableColumnDataList.get(0);
Assert.assertEquals("First character of Institutional Claim Submission Type muust be a \"I\"!", "I",
submissionTypeDataElement.getText().substring(0, 1));
WebElement pdiDataElement = middleBannerTableColumnDataList.get(3);
String pdiNumberWithoutSpaces = pdiDataElement.getText().replaceAll("\\s+","");
Assert.assertEquals("PDI value does not contain PDI value of Institutional Claim searched!", pdiNumberInstitutionalClaim,
pdiNumberWithoutSpaces);
}
public void verifyHotKeysInformationPresent() throws Exception {
WebElement hotKeysNavElement = driver.findElement(By.id("NAV_hotKeys_ewv_1"));
Assert.assertEquals("Hot Keys", hotKeysNavElement.getText());
WebElement hotKeysDropdownParentElement = hotKeysNavElement.findElement(By.xpath(".."));
WebElement hoyKeysUlElement = hotKeysDropdownParentElement.findElement(By.cssSelector("ul"));
List<WebElement> liElementsList = hoyKeysUlElement.findElements(By.cssSelector("li"));
Assert.assertEquals("Incorrect number of Hot Keys Descriptions!", 10, liElementsList.size());
WebElement liElement = liElementsList.get(0);
Assert.assertEquals("Next Section", liElement.getAttribute("innerText").trim());
WebElement imgElement = liElement.findElement(By.cssSelector("img[alt='Tab Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(1);
Assert.assertEquals("Scroll Down", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Page Down Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(2);
Assert.assertEquals("Scroll Up", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Page Up Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(3);
Assert.assertEquals("Move Down", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Arrow Down']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(4);
Assert.assertEquals("Move Up", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Arrow Up']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(5);
Assert.assertEquals("Top of Page", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Home Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(6);
Assert.assertEquals("Bottom of Page", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='End Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(7);
Assert.assertEquals("+ Move to Tab", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='Number Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(8);
Assert.assertEquals("+ Auto Paste PDI Number", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='E Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(9);
Assert.assertEquals("+ Open QuickView Tab", liElement.getAttribute("innerText").trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='1 Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
Actions builder = new Actions(driver);
builder.moveToElement(hotKeysNavElement).perform();
liElement = liElementsList.get(0);
Assert.assertEquals("Next Section", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Tab Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(1);
Assert.assertEquals("Scroll Down", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Page Down Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(2);
Assert.assertEquals("Scroll Up", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Page Up Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(3);
Assert.assertEquals("Move Down", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Arrow Down']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(4);
Assert.assertEquals("Move Up", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Arrow Up']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(5);
Assert.assertEquals("Top of Page", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Home Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(6);
Assert.assertEquals("Bottom of Page", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='End Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(7);
Assert.assertEquals("+ Move to Tab", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='Number Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(8);
Assert.assertEquals("+ Auto Paste PDI Number", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='E Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
liElement = liElementsList.get(9);
Assert.assertEquals("+ Open QuickView Tab", liElement.getText().trim());
imgElement = liElement.findElement(By.cssSelector("img[alt='Control Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
imgElement = liElement.findElement(By.cssSelector("img[alt='1 Key']"));
Assert.assertTrue("Image Element must end with '.svg' string!", imgElement.getAttribute("src").endsWith(".svg"));
}
public void verifyRenderingNameNpiTaxonomyInformationInBillingInformationServiceLines() throws Exception {
WebElement serviceLinesTableElement = driver.findElement(By.id("TBL_serviceLines_billingInfo_1"));
List<WebElement> taxonomyCodeSpanList = serviceLinesTableElement.findElements(By.xpath("//*[@id='TBL_serviceLines_billingInfo_1']//span[starts-with(text(), 'Taxonomy Code:')]"));
Assert.assertTrue("Missing expected Taxonomy Code Lines!", taxonomyCodeSpanList.size() > 0);
for (int i = 0; i < taxonomyCodeSpanList.size(); i++) {
Assert.assertTrue("Taxonomy Code Span Line is missing expected 'Taxonomy Code:' string!", taxonomyCodeSpanList.get(i).getText().startsWith("Taxonomy Code:"));
WebElement taxonomyCodeTdElement = taxonomyCodeSpanList.get(i).findElement(By.xpath(".."));
Assert.assertEquals("Expected Taxonomy Code Span Parent Element to be a 'td' element!", "td", taxonomyCodeTdElement.getTagName());
Assert.assertTrue("Expected Taxonomy Code Span Parent Element Text to have 'Taxonomy Code:' text value at the beginning!",
taxonomyCodeTdElement.getText().startsWith("Taxonomy Code:"));
WebElement taxonomyLineRowElement = taxonomyCodeTdElement.findElement(By.xpath(".."));
Assert.assertEquals("Expected Taxonomy Code 'td' Parent Element to be a 'tr' element!", "tr", taxonomyLineRowElement.getTagName());
List<WebElement> taxonomyLineRowTdElementsList = taxonomyLineRowElement.findElements(By.cssSelector("td"));
Assert.assertEquals("Incorrect number of 'td' elements for a Taxonomy Line Row!", 5, taxonomyLineRowTdElementsList.size());
WebElement tdElement = taxonomyLineRowTdElementsList.get(0);
Assert.assertEquals("Incorrect 'colspan' attribute value for 1st 'td' element in Taxonomy Line Row!", "1", tdElement.getAttribute("colspan"));
Assert.assertTrue("1st 'td' element in Taxonomy Line Row should have an empty text value!", tdElement.getText().isEmpty());
tdElement = taxonomyLineRowTdElementsList.get(1);
Assert.assertEquals("Incorrect 'colspan' attribute value for 2nd 'td' element in Taxonomy Line Row!", "2", tdElement.getAttribute("colspan"));
Assert.assertFalse("2nd 'td' element in Taxonomy Line Row should NOT be an empty text value!", tdElement.getText().isEmpty());
Assert.assertTrue("2nd 'td' element in Taxonomy Line Row should have a text value that begins with 'Rendering Provider Name:' string!",
tdElement.getText().startsWith("Rendering Provider Name:"));
tdElement = taxonomyLineRowTdElementsList.get(2);
Assert.assertEquals("Incorrect 'colspan' attribute value for 3rd 'td' element in Taxonomy Line Row!", "2", tdElement.getAttribute("colspan"));
Assert.assertFalse("3rd 'td' element in Taxonomy Line Row should NOT be an empty text value!", tdElement.getText().isEmpty());
Assert.assertTrue("3rd 'td' element in Taxonomy Line Row should have a text value that begins with 'NPI:' string!",
tdElement.getText().startsWith("NPI:"));
tdElement = taxonomyLineRowTdElementsList.get(3);
Assert.assertEquals("Incorrect 'colspan' attribute value for 4th 'td' element in Taxonomy Line Row!", "2", tdElement.getAttribute("colspan"));
Assert.assertFalse("4th 'td' element in Taxonomy Line Row should NOT be an empty text value!", tdElement.getText().isEmpty());
Assert.assertTrue("4th 'td' element in Taxonomy Line Row should have a text value that begins with 'Taxonomy Code:' string!",
tdElement.getText().startsWith("Taxonomy Code:"));
tdElement = taxonomyLineRowTdElementsList.get(4);
Assert.assertEquals("Incorrect 'colspan' attribute value for 5th 'td' element in Drug Line Row!", "1", tdElement.getAttribute("colspan"));
Assert.assertTrue("5th 'td' element in Taxonomy Line Row should have an empty text value!", tdElement.getText().isEmpty());
}
}
public void verifyVendorInformation() throws Exception {
WebElement quickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
WebElement appVendorInfoElement = quickViewElement.findElement(By.cssSelector("app-vendor-info"));
WebElement webElement = appVendorInfoElement.findElement(By.cssSelector("label[for='ACC_vendorInfo_ewv_1']"));
Assert.assertEquals("Vendor Information", webElement.getText());
// Make sure that Service Location Information is being shown.
List <WebElement> h4ElementsList = appVendorInfoElement.findElements(By.cssSelector("h4"));
webElement = h4ElementsList.get(0);
Assert.assertEquals("Service Location Information", webElement.getText());
WebElement tableElement = appVendorInfoElement.findElement(By.id("TBL_infoColumn_vendorInfo_1"));
List<WebElement> tableElementsRowsList = tableElement.findElements(By.cssSelector("tr"));
Assert.assertEquals("Incorrect number of rows for the Service Location Information table!", 9, tableElementsRowsList.size());
webElement = tableElementsRowsList.get(0).findElement(By.cssSelector("th"));
Assert.assertEquals("Tax ID:", webElement.getText());
webElement = tableElementsRowsList.get(0).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(1).findElement(By.cssSelector("th"));
Assert.assertEquals("Vendor:", webElement.getText());
webElement = tableElementsRowsList.get(1).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(2).findElement(By.cssSelector("th"));
Assert.assertEquals("Address 1:", webElement.getText());
webElement = tableElementsRowsList.get(2).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(3).findElement(By.cssSelector("th"));
Assert.assertEquals("Address 2:", webElement.getText());
webElement = tableElementsRowsList.get(3).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(4).findElement(By.cssSelector("th"));
Assert.assertEquals("City:", webElement.getText());
webElement = tableElementsRowsList.get(4).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(5).findElement(By.cssSelector("th"));
Assert.assertEquals("State:", webElement.getText());
webElement = tableElementsRowsList.get(5).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(6).findElement(By.cssSelector("th"));
Assert.assertEquals("ZIP Code:", webElement.getText());
webElement = tableElementsRowsList.get(6).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(7).findElement(By.cssSelector("th"));
Assert.assertEquals("Country:", webElement.getText());
webElement = tableElementsRowsList.get(7).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(8).findElement(By.cssSelector("th"));
Assert.assertEquals("NPI:", webElement.getText());
webElement = tableElementsRowsList.get(8).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
// Make sure that Billing Provider Information is being shown.
webElement = h4ElementsList.get(1);
Assert.assertEquals("Billing Provider Information", webElement.getText());
tableElement = appVendorInfoElement.findElement(By.id("TBL_infoColumn_vendorInfo_2"));
tableElementsRowsList = tableElement.findElements(By.cssSelector("tr"));
Assert.assertEquals("Incorrect number of rows for the Billing Provider Information table!", 10, tableElementsRowsList.size());
webElement = tableElementsRowsList.get(0).findElement(By.cssSelector("th"));
Assert.assertEquals("Tax ID:", webElement.getText());
webElement = tableElementsRowsList.get(0).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(1).findElement(By.cssSelector("th"));
Assert.assertEquals("Vendor:", webElement.getText());
webElement = tableElementsRowsList.get(1).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(2).findElement(By.cssSelector("th"));
Assert.assertEquals("Address 1:", webElement.getText());
webElement = tableElementsRowsList.get(2).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(3).findElement(By.cssSelector("th"));
Assert.assertEquals("Address 2:", webElement.getText());
webElement = tableElementsRowsList.get(3).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(4).findElement(By.cssSelector("th"));
Assert.assertEquals("City:", webElement.getText());
webElement = tableElementsRowsList.get(4).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(5).findElement(By.cssSelector("th"));
Assert.assertEquals("State:", webElement.getText());
webElement = tableElementsRowsList.get(5).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(6).findElement(By.cssSelector("th"));
Assert.assertEquals("ZIP Code:", webElement.getText());
webElement = tableElementsRowsList.get(6).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(7).findElement(By.cssSelector("th"));
Assert.assertEquals("Country:", webElement.getText());
webElement = tableElementsRowsList.get(7).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(8).findElement(By.cssSelector("th"));
Assert.assertEquals("NPI:", webElement.getText());
webElement = tableElementsRowsList.get(8).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = tableElementsRowsList.get(9).findElement(By.cssSelector("th"));
Assert.assertEquals("Taxonomy Code:", webElement.getText());
webElement = tableElementsRowsList.get(9).findElement(By.cssSelector("td"));
Assert.assertTrue(webElement.getText().length() > 0);
}
public void verifyPdfReferencesDropDown() throws Exception {
WebElement navPdfLinksEwvElement = driver.findElement(By.id("NAV_pdfLinks_ewv_1"));
navPdfLinksEwvElement.click();
Thread.sleep(1000);
WebElement dropDownParentElement = navPdfLinksEwvElement.findElement(By.xpath(".."));
WebElement ulElement = dropDownParentElement.findElement(By.cssSelector("ul"));
List<WebElement> aElementsList = ulElement.findElements(By.cssSelector("a"));
Assert.assertTrue("Should have at least 2 PDF References entries", aElementsList.size() >= 2);
// The last element is just going to be for updating/deleting PDF References that pops up a modal dialog.
// It contains no PDF Reference information.
int lastA_ElementIndex = aElementsList.size() - 1;
WebElement lastA_Element = aElementsList.get(lastA_ElementIndex);
// Now go check for all the PDF References and see that it has proper information.
for (int i = 0; i < (lastA_ElementIndex - 1); i++) {
WebElement aElement = aElementsList.get(i);
// String hrefAttrValue = aElement.getAttribute("href");
// Assert.assertTrue("The \"a\" element's \"href\" attribute value should not be null!", hrefAttrValue != null);
// Assert.assertFalse("The \"a\" element's \"href\" attribute value should not be an empty string!", hrefAttrValue.isEmpty());
String altAttrValue = aElement.getAttribute("alt");
Assert.assertTrue("The \"a\" element's \"alt\" attribute value should not be null!", altAttrValue != null);
Assert.assertFalse("The \"a\" element's \"alt\" attribute value should not be an empty string!", altAttrValue.isEmpty());
String aTextValue = aElement.getText();
Assert.assertTrue("The \"a\" element's text value should not be null!", altAttrValue != null);
Assert.assertFalse("The \"a\" element's text value should not be an empty string!", altAttrValue.isEmpty());
Assert.assertEquals("The \"alt\" attribute value and text value of the \"a\" element should be equal", aTextValue, altAttrValue);
}
// Test that the last element has proper information.
String altAttrValue = lastA_Element.getAttribute("alt");
Assert.assertTrue("The last \"a\" element's \"alt\" attribute value should not be null!", altAttrValue != null);
Assert.assertFalse("The last \"a\" element's \"alt\" attribute value should not be an empty string!", altAttrValue.isEmpty());
String aTextValue = lastA_Element.getText();
Assert.assertTrue("The last \"a\" element's text value should not be null!", altAttrValue != null);
Assert.assertFalse("The last \"a\" element's text value should not be an empty string!", altAttrValue.isEmpty());
Assert.assertEquals("The \"alt\" attribute value and text value of the last \"a\" element should be equal", aTextValue, altAttrValue);
Assert.assertEquals("Incorrect text value for last \"a\" element!", "Update/Delete PDF References", aTextValue);
}
public void verifyBillingInformationNonInstitutional() throws Exception {
WebElement quickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
WebElement appBillingInfoElement = quickViewElement.findElement(By.cssSelector("app-billing-info"));
WebElement webElement = appBillingInfoElement.findElement(By.cssSelector("label[for='ACC_billingInfo_ewv_1']"));
Assert.assertEquals("Billing Information", webElement.getText());
WebElement accordianContentWebElement = appBillingInfoElement.findElement(By.className("accordion-content"));
List <WebElement> xTypeWebElementsList = accordianContentWebElement.findElements(By.className("x-type"));
List <WebElement> xCodesWebElementsList = accordianContentWebElement.findElements(By.className("x-codes"));
WebElement h5_webElement = appBillingInfoElement.findElement(By.cssSelector("h5"));
// webElement = detailViewElement.findElement(By.id("SPN_pos_billingInfo_1"));
webElement = h5_webElement.findElement(By.cssSelector("span"));
Assert.assertEquals("POS: ", webElement.getText().substring(0, 5));
// Assert.assertEquals("POS: 11", webElement.getText());
WebElement h5_divWebElement = h5_webElement.findElement(By.cssSelector("div"));
// webElement = detailViewElement.findElement(By.id("SPN_frequency_billingInfo_1"));
webElement = h5_divWebElement.findElement(By.cssSelector("a"));
Assert.assertEquals("Frequency: ", webElement.getText().substring(0, 11));
// Assert.assertEquals("Frequency: 1", webElement.getText());
WebElement serviceLinesBillingInfoTableElement = appBillingInfoElement.findElement(By.id("TBL_serviceLines_billingInfo_1"));
WebElement serviceLinesDivElement = serviceLinesBillingInfoTableElement.findElement(By.xpath("..")).findElement(By.xpath(".."));
webElement = serviceLinesDivElement.findElement(By.cssSelector("h5"));
Assert.assertEquals("Service Lines", webElement.getText());
WebElement serviceLinesTableHeader = serviceLinesBillingInfoTableElement.findElement(By.tagName("thead"));
List<WebElement> serviceLinesTableColumnsList = serviceLinesTableHeader.findElements(By.tagName("th"));
Assert.assertTrue("No Service Lines Column Headers found!", serviceLinesTableColumnsList.size() > 0);
Assert.assertEquals("Service Lines Table must have 9 columns!", 9, serviceLinesTableColumnsList.size());
// Check for the correct column names.
for (int i = 0; i < serviceLinesTableColumnsList.size(); i++) {
WebElement tableColumnHeader = serviceLinesTableColumnsList.get(i);
String correctColumnName = null;
if (i == 0) {
correctColumnName = "Line #";
} else if (i == 1) {
correctColumnName = "Service From";
} else if (i == 2) {
correctColumnName = "Service To";
} else if (i == 3) {
correctColumnName = "POS";
} else if (i == 4) {
correctColumnName = "DX Pointer";
} else if (i == 5) {
correctColumnName = "PROC/NDC";
} else if (i == 6) {
correctColumnName = "Modifiers";
} else if (i == 7) {
correctColumnName = "Qty. / Type";
} else if (i == 8) {
correctColumnName = "Amount";
}
Assert.assertEquals(correctColumnName, tableColumnHeader.getText());
}
WebElement serviceLinesTableBody = serviceLinesBillingInfoTableElement.findElement(By.tagName("tbody"));
List<WebElement> serviceLinesTableRowsList = serviceLinesTableBody.findElements(By.tagName("tr"));
Assert.assertTrue("No Service Lines Data Rows found!", serviceLinesTableRowsList.size() > 0);
// Assert.assertEquals("Should only have one Service Line row of data!", 1, serviceLinesTableRowsList.size());
// This specific Professional Claim has one or more rows of Service Lines data.
WebElement firstRowDataElement = serviceLinesTableRowsList.get(0);
List <WebElement> serviceLineRowDataList = firstRowDataElement.findElements(By.tagName("td"));
Assert.assertTrue("No Service Lines Row Column Data found!", serviceLineRowDataList.size() > 0);
Assert.assertEquals("Service Lines Row Column Data must have 9 columns worth of data!", 9, serviceLineRowDataList.size());
// Check for correct data in the first row of the Service Lines.
// for (int i = 0; i < serviceLineRowDataList.size(); i++) {
// WebElement rowColumnDataElement = serviceLineRowDataList.get(i);
// String correctColumnRowData = null;
// if (i == 0) {
// correctColumnRowData = "1";
// } else if (i == 1) {
// correctColumnRowData = "01/23/18";
// } else if (i == 2) {
// correctColumnRowData = "";
// } else if (i == 3) {
// correctColumnRowData = "";
// } else if (i == 4) {
// correctColumnRowData = "1";
// } else if (i == 5) {
// correctColumnRowData = "90837";
// } else if (i == 6) {
// correctColumnRowData = "25";
// } else if (i == 7) {
// correctColumnRowData = "1 UN";
// } else if (i == 8) {
// correctColumnRowData = "";
// } else if (i == 9) {
// correctColumnRowData = "";
// } else if (i == 10) {
// correctColumnRowData = "180.00";
// }
//
// Assert.assertEquals(correctColumnRowData, rowColumnDataElement.getText());
// }
// webElement = detailViewElement.findElement(By.id("DIV_totalClaimCharges_serviceLines_1"));
webElement = serviceLinesDivElement.findElement(By.cssSelector("div[class='sum-line']"));
Assert.assertEquals("Total Charges:", webElement.getText().substring(0, 14));
// Assert.assertEquals("Total Charges: $180.00", webElement.getText());
}
public void verifyBillingInformationInstitutional() throws Exception {
WebElement quickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
WebElement appBillingInfoElement = quickViewElement.findElement(By.cssSelector("app-billing-info"));
WebElement webElement = appBillingInfoElement.findElement(By.cssSelector("label[for='ACC_billingInfo_ewv_1']"));
Assert.assertEquals("Billing Information", webElement.getText());
WebElement accordianContentWebElement = appBillingInfoElement.findElement(By.className("accordion-content"));
List <WebElement> xTypeWebElementsList = accordianContentWebElement.findElements(By.className("x-type"));
List <WebElement> xCodesWebElementsList = accordianContentWebElement.findElements(By.className("x-codes"));
WebElement h5_webElement = appBillingInfoElement.findElement(By.cssSelector("h5"));
// webElement = detailViewElement.findElement(By.id("SPN_pos_billingInfo_1"));
webElement = h5_webElement.findElement(By.cssSelector("a"));
Assert.assertEquals("TOB: ", webElement.getText().substring(0, 5));
// Assert.assertEquals("POS: 11", webElement.getText());
// WebElement h5_divWebElement = h5_webElement.findElement(By.cssSelector("div"));
// webElement = detailViewElement.findElement(By.id("SPN_frequency_billingInfo_1"));
// webElement = h5_divWebElement.findElement(By.cssSelector("a"));
// Assert.assertEquals("Frequency: ", webElement.getText().substring(0, 11));
// Assert.assertEquals("Frequency: 1", webElement.getText());
WebElement serviceLinesBillingInfoTableElement = appBillingInfoElement.findElement(By.id("TBL_serviceLines_billingInfo_1"));
WebElement serviceLinesDivElement = serviceLinesBillingInfoTableElement.findElement(By.xpath("..")).findElement(By.xpath(".."));
webElement = serviceLinesDivElement.findElement(By.cssSelector("h5"));
Assert.assertEquals("Service Lines", webElement.getText());
WebElement serviceLinesTableHeader = serviceLinesBillingInfoTableElement.findElement(By.tagName("thead"));
List<WebElement> serviceLinesTableColumnsList = serviceLinesTableHeader.findElements(By.tagName("th"));
Assert.assertTrue("No Service Lines Column Headers found!", serviceLinesTableColumnsList.size() > 0);
Assert.assertEquals("Service Lines Table must have 8 columns!", 8, serviceLinesTableColumnsList.size());
// Check for the correct column names.
for (int i = 0; i < serviceLinesTableColumnsList.size(); i++) {
WebElement tableColumnHeader = serviceLinesTableColumnsList.get(i);
String correctColumnName = null;
if (i == 0) {
correctColumnName = "Line #";
} else if (i == 1) {
correctColumnName = "Service From";
} else if (i == 2) {
correctColumnName = "Service To";
} else if (i == 3) {
correctColumnName = "REV";
} else if (i == 4) {
correctColumnName = "PROC/NDC";
} else if (i == 5) {
correctColumnName = "Modifiers";
} else if (i == 6) {
correctColumnName = "Qty. / Type";
} else if (i == 7) {
correctColumnName = "Amount";
}
Assert.assertEquals(correctColumnName, tableColumnHeader.getText());
}
WebElement serviceLinesTableBody = serviceLinesBillingInfoTableElement.findElement(By.tagName("tbody"));
List<WebElement> serviceLinesTableRowsList = serviceLinesTableBody.findElements(By.tagName("tr"));
Assert.assertTrue("No Service Lines Data Rows found!", serviceLinesTableRowsList.size() > 0);
// Assert.assertEquals("Should only have one Service Line row of data!", 1, serviceLinesTableRowsList.size());
// This specific Professional Claim has one or more rows of Service Lines data.
WebElement firstRowDataElement = serviceLinesTableRowsList.get(0);
List <WebElement> serviceLineRowDataList = firstRowDataElement.findElements(By.tagName("td"));
Assert.assertTrue("No Service Lines Row Column Data found!", serviceLineRowDataList.size() > 0);
Assert.assertEquals("Service Lines Row Column Data must have 8 columns worth of data!", 8, serviceLineRowDataList.size());
// Check for correct data in the first row of the Service Lines.
// for (int i = 0; i < serviceLineRowDataList.size(); i++) {
// WebElement rowColumnDataElement = serviceLineRowDataList.get(i);
// String correctColumnRowData = null;
// if (i == 0) {
// correctColumnRowData = "1";
// } else if (i == 1) {
// correctColumnRowData = "01/23/18";
// } else if (i == 2) {
// correctColumnRowData = "";
// } else if (i == 3) {
// correctColumnRowData = "";
// } else if (i == 4) {
// correctColumnRowData = "1";
// } else if (i == 5) {
// correctColumnRowData = "90837";
// } else if (i == 6) {
// correctColumnRowData = "25";
// } else if (i == 7) {
// correctColumnRowData = "1 UN";
// } else if (i == 8) {
// correctColumnRowData = "";
// } else if (i == 9) {
// correctColumnRowData = "";
// } else if (i == 10) {
// correctColumnRowData = "180.00";
// }
//
// Assert.assertEquals(correctColumnRowData, rowColumnDataElement.getText());
// }
// webElement = detailViewElement.findElement(By.id("DIV_totalClaimCharges_serviceLines_1"));
webElement = serviceLinesDivElement.findElement(By.cssSelector("div[class='sum-line']"));
Assert.assertEquals("Total Charges:", webElement.getText().substring(0, 14));
// Assert.assertEquals("Total Charges: $180.00", webElement.getText());
}
public void verifyPatientInformation() throws Exception {
WebElement quickViewElement = driver.findElement(By.id("DIV_quickView_ewv_1"));
WebElement webElement = quickViewElement.findElement(By.id("LBL_title_patientInfo_1"));
Assert.assertEquals("Patient Information", webElement.getText());
webElement = quickViewElement.findElement(By.id("TH_patientId_patientInfo_1"));
Assert.assertEquals("Patient ID:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_patientId_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_lastName_patientInfo_1"));
Assert.assertEquals("Last Name:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_lastName_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_firstName_patientInfo_1"));
Assert.assertEquals("First Name:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_firstName_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_dateOfBirth_patientInfo_1"));
Assert.assertEquals("Date of Birth:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_dateOfBirth_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_gender_patientInfo_1"));
Assert.assertEquals("Gender:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_gender_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_dateOfDeath_patientInfo_1"));
Assert.assertEquals("Date of Death:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_dateOfDeath_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_addressOne_patientInfo_1"));
Assert.assertEquals("Address 1:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_addressOne_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_addressTwo_patientInfo_1"));
Assert.assertEquals("Address 2:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_addressTwo_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_city_patientInfo_1"));
Assert.assertEquals("City:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_city_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_state_patientInfo_1"));
Assert.assertEquals("State:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_state_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_zipCode_patientInfo_1"));
Assert.assertEquals("ZIP Code:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_zipCode_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
webElement = quickViewElement.findElement(By.id("TH_country_patientInfo_1"));
Assert.assertEquals("Country:", webElement.getText());
webElement = quickViewElement.findElement(By.id("TD_country_patientInfo_1"));
Assert.assertTrue(webElement.getText().length() > 0);
}
}