π οΈDebugging
Last updated
Last updated
This part of the content requires some front-end knowledge. Ordinary users can skip the content they don't understand.
The most common error we encounter when recording scripts is that we cannot find an element in a web page. At this time, we need to verify it in the console. Each step of the script contains one or more selectors, selector or XPath. BrowTo will search for these selectors in turn. If the first search fails, it will continue to search for the second one. If all selectors are not found, the execution will fail and an error of not finding a certain element will be thrown.
When the execution fails, we can view the log information in the history of the task page. For the records of failed execution, we can see the screenshot information of the failure site, for example:
The reason for the failure of this record is that the element was not found, resulting in a timeout (click the image to enlarge it). At this time, we have the following options:
Retry: Click the Retry button under the record to retry the script and window corresponding to the record.
Open: This operation will open the window corresponding to the record, and the user can manually check the reason or interact manually, and finally manually mark the record as successful.
Mark As Success: After manually resolving the problem, mark the record as successful.
If the task has a record of failed execution or non-execution, we have the following options:
Retry failed execution records: Click this button to package all failed execution records and retry them.
Retry Unexecuted: Click this button to retry all records that have not yet been executed, usually after manually stopping the task and later continuing execution.
Retry all failed records: Click this button to package all failed execution records and unexecuted records and retry them together.
When we have bound many windows and the task has not been completed, we click the stop button in the task's operation options, and there will be remaining unexecuted records.
Another reason for not being able to find an element is that when you open the webpage for the first time, there is a pop-up window for confirming terms, but it will not appear when you open it later. You will definitely not be able to find the confirmation button in the pop-up window. How should we deal with this situation?
In the Edit Script Flow window, we can click the small black dot in front of the pop-up step to mark it as optional (click again to clear the status), as shown in the figure:
In this way, when the system cannot find the selector corresponding to the step, it will automatically skip it and continue to execute the non-optional steps below.