Overview
The Click step simulates mouse click interactions with elements on your web page. It supports various click types and configurations to handle different scenarios like new tab interactions.Form Fields
Field Name | Type | Required | Description |
---|---|---|---|
Locator | string | Yes | CSS selector or locator for the element to click |
Click Type | dropdown | No | Type of click: Left Click (default), Right Click, or Double Click |
Form Configuration
Locator Field
- Text input field for entering CSS selectors
- Supports element picker for visual selection
- Provides locator validation and suggestions
Click Type Dropdown
Available options:- Left Click (default) - Standard mouse click
- Right Click - Context menu click
- Double Click - Double-click interaction
Examples
Basic Left Click
- Locator:
button[type='submit']
- Click Type: Left Click
Right Click for Context Menu
- Locator:
.context-menu-trigger
- Click Type: Right Click
Click Link Opening New Tab
- Locator:
a[target='_blank']
- Click Type: Left Click
Double Click Action
- Locator:
.editable-text
- Click Type: Double Click
Best Practices
Locator Selection
- Use unique, stable CSS selectors that won’t change with UI updates
- Prefer
data-testid
attributes for better test stability - Avoid overly complex selectors that might break with DOM changes
Click Type Usage
- Use Left Click for standard button/link interactions
- Use Right Click when testing context menus or right-click functionality
- Use Double Click for actions that require double-clicking (like text selection or file opening)
New Tab Handling
- Enable for buttons/elements that trigger
window.open()
- Follow with a Switch Tab step if you need to interact with the new tab
Common Issues
Element Not Clickable
- Ensure the element is visible and not covered by other elements
- Verify the element is not disabled
- Check if the element is within the viewport
Timing Issues
- Add wait conditions before clicking if elements load dynamically
- Use appropriate delays for animations or transitions
New Tab Problems
- Use browser popup blockers might prevent new tabs - test in appropriate environments
Related Steps
- Hover - For hover interactions before clicking
- Switch Tab - For handling new tabs after clicks
- Wait for Element - For waiting on elements before clicking