@Test(expectedExceptions = NumberFormatException.class) public void colorChooserWithInvalidColorCode() { IJavaElement colorChooser = driver.findElementByTagName("color-chooser"); marathon_select(colorChooser, "#87436278"); }
@Override public boolean marathon_select(String value) { if (!value.equals("")) { try { ((JColorChooser) component).setColor(Color.decode(value)); return true; } catch (Throwable t) { throw new NumberFormatException("Invalid value for '" + value + "' for color-chooser '"); } } return false; }
JColorChooserJavaElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { if (!value.equals("")) { try { ((JColorChooser) component).setColor(Color.decode(value)); return true; } catch (Throwable t) { throw new NumberFormatException("Invalid value for '" + value + "' for color-chooser '"); } } return false; } }
JColorChooserJavaElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { if (!value.equals("")) { try { ((JColorChooser) component).setColor(Color.decode(value)); return true; } catch (Throwable t) { throw new NumberFormatException("Invalid value for '" + value + "' for color-chooser '"); } } return false; } JColorChooserJavaElement(Component component, IJavaAgent driver, JWindow window); }
JColorChooserJavaElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { if (!value.equals("")) { try { ((JColorChooser) component).setColor(Color.decode(value)); return true; } catch (Throwable t) { throw new NumberFormatException("Invalid value for '" + value + "' for color-chooser '"); } } return false; } JColorChooserJavaElement(Component component, IJavaAgent driver, JWindow window); @Override boolean marathon_select(String value); }
JColorChooserJavaElement extends AbstractJavaElement { @Override public boolean marathon_select(String value) { if (!value.equals("")) { try { ((JColorChooser) component).setColor(Color.decode(value)); return true; } catch (Throwable t) { throw new NumberFormatException("Invalid value for '" + value + "' for color-chooser '"); } } return false; } JColorChooserJavaElement(Component component, IJavaAgent driver, JWindow window); @Override boolean marathon_select(String value); static final Logger LOGGER; }