@Test public void selectForMultipleDuplicates() { @SuppressWarnings("unchecked") ListView<String> listViewNode = (ListView<String>) getPrimaryStage().getScene().getRoot().lookup(".list-view"); Platform.runLater(new Runnable() { @Override public void run() { listViewNode.getItems().add(2, "Row 2"); listViewNode.getItems().add(9, "Row 2"); listViewNode.getItems().add(10, "Row 2"); } }); Platform.runLater(() -> listView.marathon_select("[\"Row 2(3)\"]")); new Wait("Waiting for list item to be select") { @Override public boolean until() { return listViewNode.getSelectionModel().getSelectedIndex() == 10; } }; }
@Override public boolean marathon_select(String value) { return setItemSelection(value); }
JavaFXListViewElement extends JavaFXElement { @Override public boolean marathon_select(String value) { return setItemSelection(value); } }
JavaFXListViewElement extends JavaFXElement { @Override public boolean marathon_select(String value) { return setItemSelection(value); } JavaFXListViewElement(Node component, IJavaFXAgent driver, JFXWindow window); }
JavaFXListViewElement extends JavaFXElement { @Override public boolean marathon_select(String value) { return setItemSelection(value); } JavaFXListViewElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override List<IJavaFXElement> getByPseudoElement(String selector, Object[] params); @Override boolean marathon_select(String value); @Override String _getText(); }
JavaFXListViewElement extends JavaFXElement { @Override public boolean marathon_select(String value) { return setItemSelection(value); } JavaFXListViewElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override List<IJavaFXElement> getByPseudoElement(String selector, Object[] params); @Override boolean marathon_select(String value); @Override String _getText(); static final Logger LOGGER; }