Package org.openqa.selenium.htmlunit
Class HtmlUnitInputProcessor
java.lang.Object
org.openqa.selenium.htmlunit.HtmlUnitInputProcessor
Processes and executes input-related
HtmlUnitInputProcessor.HtmlUnitAction instances for a HtmlUnitDriver.
This class maintains an internal queue of actions that represent low-level input
operations (keyboard, pointer, wheel, etc.). Actions are collected and executed
in sequence when performActions() is called. After execution, the queue
is cleared.
- Author:
- Ronald Brill
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRepresents a low-level input action that can be executed by anHtmlUnitDriver.static final classAnHtmlUnitInputProcessor.HtmlUnitActionthat represents a key-down event.static final classAnHtmlUnitInputProcessor.HtmlUnitActionrepresenting a complete key press sequence.static final classAnHtmlUnitInputProcessor.HtmlUnitActionthat represents a key-up event.static final classA pointer action that presses a specific mouse button.static classBase class for pointer actions that operate on a specific button.static final classAnHtmlUnitInputProcessor.HtmlUnitActionthat moves the pointer to the specifiedDomElement.static final classA pointer action that releases a specific mouse button. -
Constructor Summary
ConstructorsConstructorDescriptionHtmlUnitInputProcessor(HtmlUnitDriver driver) Creates a new input processor for the given driver. -
Method Summary
Modifier and TypeMethodDescriptionvoidenqueuAction(Action action) Builds and enqueues anHtmlUnitInputProcessor.HtmlUnitActioncreated from the provided W3C WebDriverAction.voidExecutes all queuedHtmlUnitInputProcessor.HtmlUnitActioninstances in the order they were added.
-
Constructor Details
-
HtmlUnitInputProcessor
Creates a new input processor for the given driver.- Parameters:
driver- theHtmlUnitDriverused to process input actions
-
-
Method Details
-
performActions
public void performActions()Executes all queuedHtmlUnitInputProcessor.HtmlUnitActioninstances in the order they were added.Each action's
HtmlUnitInputProcessor.HtmlUnitAction.process(HtmlUnitDriver)method is invoked with the associated driver. After all actions have been processed, the internal queue is cleared. -
enqueuAction
Builds and enqueues anHtmlUnitInputProcessor.HtmlUnitActioncreated from the provided W3C WebDriverAction.If the action does not produce an
HtmlUnitInputProcessor.HtmlUnitAction(i.e., ifAction.buildHtmlUnitAction()returnsnull), nothing is enqueued.- Parameters:
action- the high-level WebDriver action to translate and queue
-