@Test public void getText() { RadioButton radioButtonNode = (RadioButton) getPrimaryStage().getScene().getRoot().lookup(".radio-button"); AssertJUnit.assertEquals(false, radioButtonNode.isSelected()); List<String> text = new ArrayList<>(); Platform.runLater(() -> { radioButton.marathon_select("true"); text.add(radioButton.getAttribute("text")); }); new Wait("Waiting for the toggle button text.") { @Override public boolean until() { return text.size() > 0; } }; AssertJUnit.assertEquals("Hello", text.get(0)); }
@Override public boolean marathon_select(String value) { boolean selected = Boolean.parseBoolean(value); boolean current = ((ToggleButton) node).isSelected(); if (selected != current) { click(); } return true; }
JavaFXToggleButtonElement extends JavaFXElement { @Override public boolean marathon_select(String value) { boolean selected = Boolean.parseBoolean(value); boolean current = ((ToggleButton) node).isSelected(); if (selected != current) { click(); } return true; } }
JavaFXToggleButtonElement extends JavaFXElement { @Override public boolean marathon_select(String value) { boolean selected = Boolean.parseBoolean(value); boolean current = ((ToggleButton) node).isSelected(); if (selected != current) { click(); } return true; } JavaFXToggleButtonElement(Node component, IJavaFXAgent driver, JFXWindow window); }
JavaFXToggleButtonElement extends JavaFXElement { @Override public boolean marathon_select(String value) { boolean selected = Boolean.parseBoolean(value); boolean current = ((ToggleButton) node).isSelected(); if (selected != current) { click(); } return true; } JavaFXToggleButtonElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override boolean marathon_select(String value); @Override String _getText(); }
JavaFXToggleButtonElement extends JavaFXElement { @Override public boolean marathon_select(String value) { boolean selected = Boolean.parseBoolean(value); boolean current = ((ToggleButton) node).isSelected(); if (selected != current) { click(); } return true; } JavaFXToggleButtonElement(Node component, IJavaFXAgent driver, JFXWindow window); @Override boolean marathon_select(String value); @Override String _getText(); static final Logger LOGGER; }