Package com.oorian.messaging.commands
Class ClickCommand
java.lang.Object
com.oorian.messaging.commands.Command
com.oorian.messaging.commands.ClickCommand
Command to programmatically trigger a click event on a DOM element.
This command simulates a user click on the specified element, firing all associated click event handlers and default behaviors as if the element was actually clicked.
Features:
- Programmatically triggers click events
- Targets specific DOM elements by ID
- Activates all associated event handlers
- Useful for automated workflows and testing
Usage:
// Trigger a click on a button
ClickCommand click = new ClickCommand("submitButton");
JsonObject json = click.toJson();
- Since:
- 2007
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClickCommand(String elementId) Constructs a new ClickCommand to trigger a click on the specified element. -
Method Summary
Modifier and TypeMethodDescriptiontoJson()Generates the JSON representation of this click command.Methods inherited from class com.oorian.messaging.commands.Command
getElementId, getId, setElementId, toString
-
Constructor Details
-
ClickCommand
Constructs a new ClickCommand to trigger a click on the specified element.- Parameters:
elementId- the ID of the DOM element to click
-
-
Method Details