Package org.openqa.selenium

Examples of org.openqa.selenium.WebElement.findElements()


    // Verify Second Evaluation
    clickEvaluationViewResults(1);
    waitForElementPresent(resultDetailRadio);
    //TODO: abstract function
    WebElement htmldiv = driver.findElement(By.id("coordinatorEvaluationSummaryTable"));
    assertEquals(5, htmldiv.findElements(By.tagName("tr")).size());
  }

  /**
   * Test Student Drop Class before submitting feedback
   */
 
View Full Code Here


    waitAndClick(By.className("t_course_view"));
    waitForElementPresent(By.cssSelector("#dataform tr"));

    WebElement htmldiv = driver.findElement(By.id("coordinatorStudentTable"));

    assertEquals(5, htmldiv.findElements(By.tagName("tr")).size());

    waitAndClickAndConfirm((By.xpath(String.format("//table[@id='dataform']//tr[%d]//a[3]", 2))));

    waitAWhile(5000);
    assertEquals(4, htmldiv.findElements(By.tagName("tr")).size());
View Full Code Here

    return By.className("t_eval_status");
  }

  public static int studentCountCourses() {
    WebElement dataform = driver.findElement(By.id("dataform"));
    return dataform.findElements(By.tagName("tr")).size();
  }

  public static void studentClickEditEvaluation(int row) {
    waitAndClick(By.id("editEvaluation" + row));
  }
View Full Code Here

    if(getElementText(By.xpath(String.format("//table[@id='dataform']//tr[2]//td[1]"))).isEmpty()){
      return 0;
    }
    else {
      WebElement dataform = driver.findElement(By.id("dataform"));
      return dataform.findElements(By.tagName("tr")).size() - 1;
    }
  }

  /**
   * page: Enrol Student
View Full Code Here

    waitAndClickAndConfirm(By.xpath(String.format("//table[@id='dataform']//tr[%d]//a[3]", row + 2)));
  }

  public static int countCourseDetailStudents() {
    WebElement htmldiv = driver.findElement(By.id("coordinatorStudentTable"));
    return htmldiv.findElements(By.tagName("tr")).size();
  }

  // edit student:

  /**
 
View Full Code Here

    System.out.println("delete all students");
    driver.findElement(By.className("t_courses")).click();
    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

    if(getElementText(By.xpath(String.format("//table[@id='dataform']//tr[2]//td[1]"))).isEmpty()){
      return 0;
    }
    else {
      WebElement dataform = driver.findElement(By.id("dataform"));
      return dataform.findElements(By.tagName("tr")).size() - 1;
    }
  }

  /**
   * @page view evaluation result (result)
View Full Code Here

    waitAndClick(By.id("editEvaluationResults" + row));
  }

  public static int countReviewerSummaryStudents() {
    WebElement htmldiv = driver.findElement(By.id("coordinatorEvaluationSummaryTable"));
    return htmldiv.findElements(By.tagName("tr")).size();
  }

  // reviewee summary:
  public static By getRevieweeSummaryClaimed(int studentIndex) {
    return By.xpath(String.format("//div[@id='coordinatorEvaluationSummaryTable']//table[@id='dataform']//tr[%d]//td[%d]", studentIndex + 2, 3));
View Full Code Here

      wdClick(By.id("btnJoinCourse"));
      waitForElementText(By.id("statusMessage"),
          "Registration key is invalid.");

      WebElement dataform = driver.findElement(By.id("dataform"));
      if (dataform.findElements(By.tagName("tr")).size() == 1) {
        // This time the correct one
        waitForElementPresent(By.id("regkey"));
        wdFillString(By.id("regkey"), s.courseKey);
        System.out.println("key for " + s.name + " : " + s.courseKey);
        wdClick(By.id("btnJoinCourse"));
View Full Code Here

    waitAndClick(By.id("viewEvaluation1"));
    waitForElementPresent(By.id("radio_detail"));

    WebElement htmldiv = driver.findElement(By
        .id("coordinatorEvaluationSummaryTable"));
    assertEquals(5, htmldiv.findElements(By.tagName("tr")).size());
  }

  /**
   * Test Student Drop Class before submitting feedback
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.