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 po;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class EDI_Prof_Quick_PO {
WebDriver driver;
public EDI_Prof_Quick_PO(WebDriver driver){
this.driver = driver;
PageFactory.initElements(driver, this);
}
@FindBy(id = "TAB_qvTab_ewvMaster_1")
private WebElement tabQuicklView; // Detail Tab
@FindBy(xpath = "//div[@id='DIV_quickView_ewv_1']/app-ohi-info/div/div/div/table/tbody[1]/tr/td/app-tooltip/a/span")
private List<WebElement> ohiInfoTooltips; // Tooltips
@FindBy(xpath =
"//div[@id='DIV_quickView_ewv_1']/app-ohi-info/div/div/div/table/tbody[2]/tr[2]/td/div/app-tooltip/button/span")
//*[@id="DIV_quickView_ewv_1"]/app-ohi-info/div/div/div/table/tbody[2]/tr[2]/td/div/app-tooltip/button/span
private List<WebElement> remRemarkCodeTooltips; // Toolt
@FindBy(xpath="//*[@id='TBL_headerInfo_ewv_1']/tbody/tr[1]/td[1]")
private WebElement loadCopmleteFlag;
@FindBy(xpath="//*[@id='DIV_quickView_ewv_1']/app-ohi-info/div/div/div/table/tbody[2]/tr[1]/td[6]/app-tooltip/a/span")
private WebElement ohiLineAdj;
// Billing Info --- POS
@FindBy(xpath = "//*[@id='DIV_quickView_ewv_1']/div[2]/app-billing-info/div/h5/span")
private WebElement pos;
// Billing Info --- Freq
@FindBy(xpath = "//*[@id='DIV_quickView_ewv_1']/div[2]/app-billing-info/div/h5/div/a/strong")
private WebElement freq;
//Billing Info --- DX codes
@FindBy(xpath = "//*[@id='DIV_quickView_ewv_1']/div[2]/app-billing-info/div/div[1]/div/div[1]/div[1]/div[2]/div/span")
private List<WebElement> dxCodes;
//Service Lines
@FindBy(xpath = "(//*[@id='TBL_serviceLines_billingInfo_1'])[2]/tbody/tr[1]/td")
//*[@id="TBL_serviceLines_billingInfo_1"]/tbody/tr[1]/td[2]
private List<WebElement> serviceLine;
public ArrayList<String> getOHIInfo_Tooltips(){
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.attributeToBe(loadCopmleteFlag, "innerHTML", "P(5010)"));
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: ohiInfoTooltips){
array.add(item.getAttribute("innerHTML"));
}
return array;
}
public ArrayList<String> getRemRemarkTooltips(){
ArrayList<String> array = new ArrayList<String>();
for(WebElement item: remRemarkCodeTooltips){
array.add(item.getAttribute("innerHTML"));
//System.out.println(item.getAttribute("innerHTML"));
}
return array;
}
public String getOhiLineAdj(){
return ohiLineAdj.getAttribute("innerHTML");
}
// Verify hightlighting
public boolean isPOSHighlighted(){
if(pos.getAttribute("style").equals("background-color: yellow;"))
return true;
return false;
}
public boolean isFreqHighlighted(){
if(freq.getAttribute("style").equals("background-color: yellow;"))
return true;
return false;
}
public boolean isDXLinesHighlighted(){
for(WebElement item: dxCodes) {
//System.out.println(item.getAttribute("style"));
if(item.getAttribute("style").equals("background-color: yellow;"))
return true; }
return false;
}
//public boolean isPOSHighlighted(){
// pos.getAttribute("background-color");
// return false;
// }
public boolean isServiceLinesHighlighted(){
for(WebElement item: serviceLine) {
//System.out.println(item.getAttribute("style"));
if(!item.getAttribute("style").equals("background-color: yellow;"))
return false; }
return true;
}
}