If the "Click" command fails, there may be multiple reasons. To resolve the issue quickly, please follow the troubleshooting steps outlined on this help page.
Table of Contents
- When the failure is caused by the target element not being found
- When the failure occurs because a different element is clicked instead of the target element
- When the execution log indicates success, but the click is not actually performed
- If the cause of failure is unknown
When the failure is caused by the target element not being found
In cases like the one shown in the image above, the following possibilities should be considered:
- The specified locator has an issue
- A modification to the screen has changed the locator of the target element
- The ai locator is being used
- The previous step failed (e.g., page transition did not occur), so the target element does not exist on the page
- The target element takes time to appear
For maintenance methods, please refer to this guide.
When the failure occurs because a different element is clicked instead of the target element
In some cases, the execution log may show a warning like the one below, followed by failure:
click([“Register” button], {})
[WARNING] As operation on the specified element failed, will retry by specifying coordinates. If the target element is covered by another element, the element above will be clicked.
the target position: (1099, 799)
In this case, a different element is overlapping the target element, causing the unintended element to be clicked, leading to failure.
For more details, please refer to this guide.
When the execution log indicates success, but the click is not actually performed
To narrow down the issue, please check the following:
- Does the issue persist if the "Click" command is changed to the "Click specified position" command?
- Does the issue persist if the locator is changed?
- Does the issue persist when executed manually?
- Does the issue persist when executed in a different environment (different app, execution environment, or browser)?
Does the issue persist even if the "Click" command is changed to the "Click specified position" command?
Change the "Click" command to the "Click specified position" command and rerun the test.
If the "Click specified position" command fails, try using the "Click" command instead.
Reference: Difference between “Click” and “Click specified position” commands
Does the issue persist even if the locator is changed?
Check if changing to an alternative locator suggested in the locators list resolves the issue.
Additionally, try temporarily hide feature to reveal alternative elements for selection.
Does the issue persist when executed manually?
For browser tests in a cloud environment, follow these steps:
(If testing in a local PC environment, perform the same steps in your local browser.)
1. Open Developer Tools in the browser (on the right side of the test case edit screen).
Example: When using Chrome in the cloud browser of MagicPod
2. While keeping Developer Tools open, manually perform the step. (Do not use “Run” or “Partial Run”; perform the action manually.)
3. If the issue occurs manually as well, check the “Console” tab.
- If an error is displayed in the “Console” tab, modify the target application based on the error message.
- If resolution is difficult, take screenshots of both the “Console” tab and the “Network” tab and share them with MagicPod support.
The “Console” tab
The “Network” tab
Does the issue persist when executed in a different environment?
Test the following three aspects:
1. Different app
- If testing in a development environment, check if the issue also occurs in a production or another development environment.
- If it fails in the development environment but succeeds in production, the issue is likely with the development environment. Please consult the app developer.
2. Different execution environment
- If testing in a cloud environment, check if the issue also occurs in a local PC environment.
- If it fails in both the cloud and local PC environments, try performing the test manually in the local browser. If the manual test also fails, the issue is likely with the target application. Please consult the app developer.
3. Different browser
- If testing in Chrome, check if the issue also occurs in Edge or Firefox.
If the cause of failure is unknown
If you have checked everything on this page and still cannot resolve the issue, please contact MagicPod support through the inquiry button on the test results page.
Providing detailed information will help in resolving the issue quickly.
// Manual execution results
Success or Failure*
*If manual execution fails, attach screenshots of the console log and network log.
// Execution results in different environments (different app, execution environment, or browser)
*If you have tested in multiple environments, please provide all results.
Tested environments:
Execution result: Success or Failure