예제 #1
0
  @Test
  public void testFocusOnMouseOpen() {

    GridCellElement cell = getGridElement().getCell(4, 2);

    cell.doubleClick();

    WebElement focused = getFocusedElement();

    assertEquals("", "input", focused.getTagName());
    assertEquals("", cell.getText(), focused.getAttribute("value"));
  }
예제 #2
0
  @Test
  public void testFocusOnKeyboardOpen() {

    GridCellElement cell = getGridElement().getCell(4, 2);

    cell.click();
    new Actions(getDriver()).sendKeys(Keys.ENTER).perform();

    WebElement focused = getFocusedElement();

    assertEquals("", "input", focused.getTagName());
    assertEquals("", cell.getText(), focused.getAttribute("value"));
  }