If you receive the error message, "WebElement not found in 10 seconds" while executing a flow in LEAPWORK, it is because of synchronization issues between the test application and LEAPWORK's speed of test execution.
Here are three possible reasons as to why it happens with some potential solutions:
-
Insufficient Timeout (sec):
By default, the maximum time spent searching for the captured web element on a block-level is 10 seconds. If the application takes more than 10 seconds to render the control, the used LEAPWORK block will throw the error message, "WebElement not found in 10 seconds" in console logs. This synchronization issue can be tackled by increasing the timeout to a higher limit, for example, 30 seconds. This approach ensures that the test moves forward once the control is loaded properly. For example, if you set it to 30 seconds and the control is loaded in 5 seconds, it will not waste the next 25 seconds, but will simply move forward. It will fail only after a full 30 seconds have passed waiting for the control.
-
Delay because of page loading or latency in the network or database :
This issue may occur if a LEAPWORK block tries to access the control that is still loading on a web page because of slow server responses or database latency issues, etc. This can be handled by searching for a control when it has completely loaded using the Await Dom Change option at block-level, as shown in the following screenshot.
You should use this option after page navigation, page refresh, screen change or waiting for screen/control change because of an Ajax/rest call behind the scenes of a web application.
- Locator Strategy:
This error may also occur if there is a change in the capture element strategy or if you pick a strategy that is dynamic in nature. To check this, you need to re-validate the strategy and check if it finds the element under review. If not, look to see if it is using a dynamic strategy, as shown in the following image.
If the current strategy looks dynamic, you have the option to choose one of the multiple strategies from the left-hand side of the strategy editor (see the following example), choose another strategy, and validate to confirm.
Have questions? Contact our Priority Support.
Comments
0 comments
Please sign in to leave a comment.