You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GridElement.java 1.1KB

12345678910111213141516171819202122232425262728293031
  1. package com.vaadin.testbench.customelements;
  2. import org.openqa.selenium.NoSuchElementException;
  3. import com.vaadin.testbench.By;
  4. import com.vaadin.testbench.TestBenchElement;
  5. import com.vaadin.testbench.elementsbase.ServerClass;
  6. @ServerClass("com.vaadin.ui.Grid")
  7. public class GridElement extends com.vaadin.testbench.elements.GridElement {
  8. /**
  9. * Gets the element that contains the details of a row.
  10. *
  11. * @since 8.0
  12. * @param rowIndex
  13. * the index of the row for the details
  14. * @return the element that contains the details of a row. <code>null</code>
  15. * if no widget is defined for the detials row
  16. * @throws NoSuchElementException
  17. * if the given details row is currently not open
  18. */
  19. public TestBenchElement getDetails(int rowIndex)
  20. throws NoSuchElementException {
  21. return getSubPart("#details[" + rowIndex + "]");
  22. }
  23. private TestBenchElement getSubPart(String subPartSelector) {
  24. return (TestBenchElement) findElement(By.vaadin(subPartSelector));
  25. }
  26. }