/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * @param c the character you with to simulate typing * @param startAtEnd whether typing should start at the text end or not * @param lastType is this the last character to type */ protected void doType(final char c, final boolean startAtEnd, final boolean lastType) { final DomNode domNode = getDoTypeNode(); if (domNode instanceof DomText) { ((DomText) domNode).doType(c, startAtEnd, this, lastType); } else if (domNode instanceof HtmlElement) { try { ((HtmlElement) domNode).type(c, startAtEnd, lastType); } catch (final IOException e) { throw new RuntimeException(e); } } }
/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * @param c the character you with to simulate typing * @param lastType is this the last character to type */ protected void doType(final char c, final boolean lastType) { final DomNode domNode = getDoTypeNode(); if (domNode instanceof DomText) { ((DomText) domNode).doType(c, this, lastType); } else if (domNode instanceof HtmlElement) { try { ((HtmlElement) domNode).type(c, lastType); } catch (final IOException e) { throw new RuntimeException(e); } } }
/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * * An example of predefined values is {@link KeyboardEvent#DOM_VK_PAGE_DOWN}. * * @param keyCode the key code wish to simulate typing * @param startAtEnd whether typing should start at the text end or not * @param lastType is this the last to type */ protected void doType(final int keyCode, final boolean startAtEnd, final boolean lastType) { final DomNode domNode = getDoTypeNode(); if (domNode instanceof DomText) { ((DomText) domNode).doType(keyCode, startAtEnd, this, lastType); } else if (domNode instanceof HtmlElement) { ((HtmlElement) domNode).type(keyCode, startAtEnd, true, true, true, lastType); } }
/** * Performs the effective type action, called after the keyPress event and before the keyUp event. * * An example of predefined values is {@link KeyboardEvent#DOM_VK_PAGE_DOWN}. * * @param keyCode the key code wish to simulate typing * @param lastType is this the last to type */ protected void doType(final int keyCode, final boolean lastType) { final DomNode domNode = getDoTypeNode(); if (domNode instanceof DomText) { ((DomText) domNode).doType(keyCode, this, lastType); } else if (domNode instanceof HtmlElement) { ((HtmlElement) domNode).type(keyCode, true, true, true, lastType); } }