Exemplo n.º 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"));
  }
Exemplo n.º 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"));
  }