Package org.openqa.selenium

Examples of org.openqa.selenium.By


  }

  public int studentFindPendingEvaluationRow(String courseId, String evalName) {

    for (int i = 0; i < studentCountTotalPendingEvaluations(); i++) {
      By course = By.xpath(String.format("//div[@id='studentPendingEvaluations']//table[@id='dataform']//tbody//tr[%d]//td[%d]", i + 1, 1));
//      System.out.println("course id = " + this.getElementText(course));
      By evaluation = By.xpath(String.format("//div[@id='studentPendingEvaluations']//table[@id='dataform']//tbody//tr[%d]//td[%d]", i + 1, 2));
//      System.out.println("eval id = " + this.getElementText(evaluation));
      if (this.getElementText(course).equals(courseId) && this.getElementText(evaluation).equals(evalName)) {
        return i;
      }
    }
View Full Code Here


      fail("Student's evaluation not found. Cannot click edit evaluation.");
    }
  }

  public void studentClickEvaluationViewResults(int row) {
    By link = By.xpath(String.format("//div[@id='studentPastEvaluations']//table[@id='dataform']//tr[%d]//td[%d]//a[1]", row + 2, 5));
    waitAndClick(link);
  }
View Full Code Here

  }

  public int studentFindEvaluationRow(String courseId, String evalName) {

    for (int i = 0; i < studentCountTotalEvaluations(); i++) {
      By course = By.xpath(String.format("//div[@id='studentPastEvaluations']//table[@id='dataform']//tbody//tr[%d]//td[%d]", i + 2, 1));
      System.out.println(this.getElementText(course));
     
      By evaluation = By.xpath(String.format("//div[@id='studentPastEvaluations']//table[@id='dataform']//tbody//tr[%d]//td[%d]", i + 2, 2));
      System.out.println(this.getElementText(evaluation));
     
      if (this.getElementText(course).equals(courseId) && this.getElementText(evaluation).equals(evalName)) {
        return i;
      }
View Full Code Here

      fail("Student not found in this course.");
    }
  }

  public void clickCourseDetailInvite(int row) {
    By link = By.xpath(String.format("//table[@id='dataform']//tr[%d]//td[%d]//a[3]", row + 2, 4));
    waitAndClick(link);
  }
View Full Code Here

    waitAndClick(By.className("t_course_view"));
    waitForElementPresent(By.id("dataform tr"));
    WebElement dataform = driver.findElement(By.id("dataform"));
    while (dataform.findElements(By.tagName("tr")).size() > 1) {
      System.out.println("Delete a student...");
      By by = By.xpath(String.format("//table[@id='dataform']//tr[%d]//a[4]", 2));
      waitForElementPresent(by);
      clickAndConfirm(by);
      waitForElementPresent(By.id("dataform tr"));
    }
  }
View Full Code Here

      return "getEvaluationResponse(String evalName) failed.";
    }
  }

  public void clickEvaluationViewResults(int row) {
    By link = By.xpath(String.format("//div[@id='coordinatorEvaluationTable']//table[@id='dataform']//tr[%d]//td[%d]//a[@class='t_eval_view']", row + 2, 5));
    waitAndClick(link);
  }
View Full Code Here

      fail("Evaluation not found.");
    }
  }

  public void clickEvaluationEdit(int row) {
    By link = By.xpath(String.format("//div[@id='coordinatorEvaluationTable']//table[@id='dataform']//tr[%d]//td[%d]//a[@class='t_eval_edit']", row + 2, 5));
    waitAndClick(link);
  }
View Full Code Here

      fail("Evaluation not found.");
    }
  }

  public void clickEvaluationPublish(int row) {
    By link = By.xpath(String.format("//div[@id='coordinatorEvaluationTable']//table[@id='dataform']//tr[%d]//td[%d]//a[@class='t_eval_publish']", row + 2, 5));
    clickAndConfirm(link);
  }
View Full Code Here

      fail("Evaluation not found.");
    }
  }

  public void clickEvaluationUnpublish(int row) {
    By link = By.xpath(String.format("//div[@id='coordinatorEvaluationTable']//table[@id='dataform']//tr[%d]//td[%d]//a[@class='t_eval_unpublish']", row + 2, 5));
    clickAndConfirm(link);
  }
View Full Code Here

      fail("Evaluation not found.");
    }
  }

  public void clickAndConfirmEvaluationRemind(int row) {
    By link = By.xpath(String.format("//div[@id='coordinatorEvaluationTable']//table[@id='dataform']//tr[%d]//td[%d]//a[@class='t_eval_remind']", row + 2, 5));
    clickAndConfirm(link);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.By

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.