コード例 #1
0
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  // 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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  // 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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  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
ファイル: IncidentPage.java プロジェクト: RajPunchIt/PunchIt
  public IncidentPage enterShortDescription(String desc) {
    if (!enterByXpath("CREATEINC_shortDesc_Xpath", desc))
      Reporter.reportStep("The short description: " + desc + " could not be entered", "FAILURE");

    return this;
  }