Пример #1
0
  public IncidentPage clickProcess() {
    if (clickByXpath("CREATEINC_Process_Xpath"))
      Reporter.reportStep("The Process Tab is clicked successfully", "SUCCESS");
    else Reporter.reportStep("The Process Tab could not be entered", "FAILURE");

    return this;
  }
Пример #2
0
  public IncidentPage verifyErrorMessage(String errorMessage) {
    if (getTextAndAcceptAlert().equals(errorMessage))
      Reporter.reportStep(
          "The error message :" + errorMessage + " appeared as expected", "SUCCESS");
    else Reporter.reportStep("The error message :" + errorMessage + " did not appear", "FAILURE");

    return this;
  }
Пример #3
0
  public IncidentPage enterAssignedTo(String asgTo) {
    if (enterAndChoose("CREATEINC_AssignedTo_Xpath", asgTo))
      Reporter.reportStep("The Assigned To is entered successfully", "SUCCESS");
    else
      Reporter.reportStep(
          "The Assigned To: " + asgTo + " not found / could not be entered", "FAILURE");

    return this;
  }
Пример #4
0
  // The page allows the user to submit the incident form
  public IncidentPage submitIncident() {
    clickByXpath("CREATEINC_Submit_Xpath");

    if (isExistById("Welcome_Id"))
      Reporter.reportStep("The Create Incident process is successful", "SUCCESS");
    else Reporter.reportStep("The Create Incident process failed. Check snapshot", "SUCCESS");

    return this;
  }
Пример #5
0
  public IncidentPage clickFirstIncident() {

    // click the first Incident Link
    if (clickByXpath("ALERTPROFILE_FirstAlert_Xpath"))
      Reporter.reportStep("The First Incident is clicked Successfully", "SUCCESS");
    else Reporter.reportStep("The First Incident could not be clicked", "FAILURE");

    return new IncidentPage(driver);
  }
Пример #6
0
  public IncidentPage enterAffectedUser(String aUser) {
    if (enterAndChoose("CREATEINC_AffectedUser_Xpath", aUser))
      Reporter.reportStep("The Affected User is entered successfully", "SUCCESS");
    else
      Reporter.reportStep(
          "The Affected User: "******" not found / could not be entered", "FAILURE");

    return this;
  }
Пример #7
0
  public IncidentPage enterBusinessServiceForSuccess(String configItem) {
    if (enterAndChoose("CREATEINC_ConfigItem_Xpath", configItem))
      Reporter.reportStep(
          "The configuration item: " + configItem + " found and entered", "SUCCESS");
    else
      Reporter.reportStep(
          "The configuration item: " + configItem + " not found / could not be entered", "FAILURE");

    return this;
  }
Пример #8
0
  // The page allows the user to submit the incident form
  public IncidentPage saveIncident() {
    clickById("Save_Id");
    Wait(5000);

    if (getTextByXpath("CREATEINC_Pointer_Xpath").contains(getIncidentNumber()))
      Reporter.reportStep("The Create Incident process is successful", "SUCCESS");
    else Reporter.reportStep("The Create Incident process failed. Check snapshot", "SUCCESS");

    return this;
  }
Пример #9
0
  public IncidentPage enterConfigurationItemForFailure(String configItem) {
    if (!enterAndChoose("CREATEINC_ConfigItem_Xpath", configItem))
      Reporter.reportStep(
          "The configuration item: " + configItem + " not found as expected", "SUCCESS");
    else
      Reporter.reportStep(
          "The configuration item: " + configItem + " found and entered", "FAILURE");

    return this;
  }
Пример #10
0
  public IncidentPage hoverCallerId() {

    mouseOverById("CREATEINC_Caller_Id");

    if (isExistById("CREATEINC_SysUserName_Id"))
      Reporter.reportStep("The User Information displayed successfully", "SUCCESS");
    else Reporter.reportStep("The User Information is not on mouse Over", "FAILURE");

    return this;
  }
Пример #11
0
  public IncidentPage verifyBusinessServiceContent(String sBusinessService) {

    // Switch to the menu frame
    switchToMainFrame();

    if (getAttributeByXpath("CREATEINC_BusinesService_Xpath", "value").equals(sBusinessService))
      Reporter.reportStep(
          "The business service field has value: " + sBusinessService + " as expected", "SUCCESS");
    else
      Reporter.reportStep(
          "The business service field do not have value: " + sBusinessService + "; hence failed",
          "FAILURE");

    return this;
  }
Пример #12
0
  public IncidentPage enterConfigurationItem(String configItem) {
    if (!enterAndChoose("CREATEINC_ConfigItem_Xpath", configItem))
      Reporter.reportStep(
          "The configuration item: " + configItem + " not found / could not be entered", "FAILURE");

    return this;
  }
Пример #13
0
  public IncidentPage enterReportingCustomer(String repCust) {
    if (!enterAndChoose("CREATEINC_RepCust_Xpath", repCust))
      Reporter.reportStep(
          "The reporting customer: " + repCust + " not found / could not be entered", "FAILURE");

    return this;
  }
Пример #14
0
  public IncidentPage enterAssignmentGroup(String asgGroup) {
    if (!enterAndChoose("CREATEINC_AsgGroup_Xpath", asgGroup))
      Reporter.reportStep(
          "The Assignment Group: " + asgGroup + " not found / could not be entered", "FAILURE");

    return this;
  }
Пример #15
0
  public String getIncidentNumber() {
    incidentNumber = getAttributeByXpath("CREATEINC_IncidentNumber_Xpath", "value");

    if (incidentNumber.equals(""))
      Reporter.reportStep("The incident number is blank for newly created incident", "FAILURE");

    return incidentNumber;
  }
Пример #16
0
  public IncidentsListPage(RemoteWebDriver driver) {
    this.driver = driver;

    switchToMainFrame();

    // Check that we're on the right page.
    if (!isExistByXpath("INCLIST_Table_Xpath")) {
      Reporter.reportStep("This is not the Incident List page", "FAILURE");
    }

    switchToMainFrame();
  }
Пример #17
0
  public IncidentPage populateMandatoryFields(
      String configItem, String repCust, String asgGroup, String desc) {

    enterConfigurationItem(configItem)
        .enterReportingCustomer(repCust)
        .enterAssignmentGroup(asgGroup)
        .enterShortDescription(desc);

    Reporter.reportStep(
        "The Mandatory fields of Create Incident are entered successfully", "SUCCESS");
    return this;
  }
Пример #18
0
  public IncidentPage(RemoteWebDriver driver) {
    this.driver = driver;

    goOutOfFrame();

    // Check that we're on the right page.
    if (!isExistById("Welcome_Id")) {
      Reporter.reportStep("This is not the home page", "FAILURE");
    }

    switchToMainFrame();
  }
Пример #19
0
  public HomePage() {

    if (!driver.getTitle().contains("Welcome")) {
      Reporter.reportStep("This is not Home page !! ", "FAIL");
    }
  }
Пример #20
0
  public IncidentPage enterShortDescription(String desc) {
    if (!enterByXpath("CREATEINC_shortDesc_Xpath", desc))
      Reporter.reportStep("The short description: " + desc + " could not be entered", "FAILURE");

    return this;
  }