Package org.openqa.selenium.htmlunit
Class HtmlUnitInputProcessor
- java.lang.Object
-
- org.openqa.selenium.htmlunit.HtmlUnitInputProcessor
-
public class HtmlUnitInputProcessor extends Object
Processes and executes input-relatedHtmlUnitInputProcessor.HtmlUnitActioninstances for aHtmlUnitDriver.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 Classes Modifier and Type Class Description static interfaceHtmlUnitInputProcessor.HtmlUnitActionRepresents a low-level input action that can be executed by anHtmlUnitDriver.static classHtmlUnitInputProcessor.KeyDownHtmlUnitActionAnHtmlUnitInputProcessor.HtmlUnitActionthat represents a key-down event.static classHtmlUnitInputProcessor.KeySendHtmlUnitActionAnHtmlUnitInputProcessor.HtmlUnitActionrepresenting a complete key press sequence.static classHtmlUnitInputProcessor.KeyUpHtmlUnitActionAnHtmlUnitInputProcessor.HtmlUnitActionthat represents a key-up event.static classHtmlUnitInputProcessor.PointerDownHtmlUnitActionA pointer action that presses a specific mouse button.static classHtmlUnitInputProcessor.PointerHtmlUnitActionBase class for pointer actions that operate on a specific button.static classHtmlUnitInputProcessor.PointerMoveHtmlUnitActionAnHtmlUnitInputProcessor.HtmlUnitActionthat moves the pointer to the specifiedDomElement.static classHtmlUnitInputProcessor.PointerUpHtmlUnitActionA pointer action that releases a specific mouse button.
-
Constructor Summary
Constructors Constructor Description HtmlUnitInputProcessor(HtmlUnitDriver driver)Creates a new input processor for the given driver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenqueuAction(Action action)Builds and enqueues anHtmlUnitInputProcessor.HtmlUnitActioncreated from the provided W3C WebDriverAction.voidperformActions()Executes all queuedHtmlUnitInputProcessor.HtmlUnitActioninstances in the order they were added.
-
-
-
Constructor Detail
-
HtmlUnitInputProcessor
public HtmlUnitInputProcessor(HtmlUnitDriver driver)
Creates a new input processor for the given driver.- Parameters:
driver- theHtmlUnitDriverused to process input actions
-
-
Method Detail
-
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
public void enqueuAction(Action action)
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
-
-