}
private void createStateMenu(MenuItem stateMenu) {
+ MenuItem tabIndexMenu = stateMenu.addItem("Tab index", null);
+ addGridMethodMenu(tabIndexMenu, "0", 0, grid::setTabIndex);
+ addGridMethodMenu(tabIndexMenu, "-1", -1, grid::setTabIndex);
+ addGridMethodMenu(tabIndexMenu, "10", 10, grid::setTabIndex);
+
MenuItem frozenColMenu = stateMenu.addItem("Frozen column count", null);
for (int i = -1; i < 3; ++i) {
addGridMethodMenu(frozenColMenu, "" + i, i,
createSelectionMenu(stateMenu);
stateMenu.addItem("Set focus", item -> grid.focus());
- MenuItem tabIndexMenu = stateMenu.addItem("Tab index", null);
- addGridMethodMenu(tabIndexMenu, "0", 0, grid::setTabIndex);
- addGridMethodMenu(tabIndexMenu, "-1", -1, grid::setTabIndex);
- addGridMethodMenu(tabIndexMenu, "10", 10, grid::setTabIndex);
}
private void createRowStyleMenu(MenuItem rowStyleMenu) {
package com.vaadin.tests.focusable;
+import org.openqa.selenium.NoSuchElementException;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.testbench.By;
import com.vaadin.testbench.customelements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.tests.components.grid.basics.GridBasics;
protected GridCellElement getFocusElement() {
return $(GridElement.class).first().getCell(0, 0);
}
+
+ @Override
+ protected WebElement getMenuElement(String menuCaption)
+ throws NoSuchElementException {
+ return super.getMenuElement(menuCaption).findElement(By.xpath(".."));
+ }
}