Class CommonActionOptions
java.lang.Object
io.github.jspinak.brobot.actions.actionOptions.CommonActionOptions
Provides factory methods for commonly used ActionOptions configurations.
CommonActionOptions simplifies the creation of frequently needed ActionOptions patterns, reducing boilerplate code and promoting consistency across automation scripts. It encapsulates best practices for common action configurations, making the framework more accessible to users who may not be familiar with all available options.
Predefined configurations:
- Standard: Basic action configuration with specified action type and wait time
- Find and Multiple Clicks: Optimized for scenarios requiring multiple clicks on the same element
- Type: Keyboard input configurations with optional modifier keys
Benefits:
- Reduces code duplication for common action patterns
- Ensures consistent configuration across the application
- Provides semantic method names that clarify intent
- Simplifies the learning curve for new framework users
Usage examples:
- Standard click with 5-second wait:
standard(Action.CLICK, 5.0)
- Double-click:
findAndMultipleClicks(3.0, 2)
- Type with Ctrl modifier:
type("CTRL")
In the model-based approach, CommonActionOptions promotes standardization of action configurations, which is essential for maintaining predictable automation behavior across different parts of the application. This standardization helps in debugging and ensures consistent timing and behavior patterns.
- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAndMultipleClicks
(double maxWait, int clicks) standard
(ActionOptions.Action action, double maxWait) type()
-
Constructor Details
-
CommonActionOptions
public CommonActionOptions()
-
-
Method Details
-
standard
-
findAndMultipleClicks
-
type
-
type
-