Just because the AI sees a "Save" button doesn't mean it knows which record is being saved. The position of the button on the web page will be affected by the window width, pop-up window and loading status; even if the click is successful, it may act on the wrong object. This article discusses automated design in owned or licensed websites and has not been operationally tested on any third-party pages.
Find the object first, then find its button
Playwright's official documentation provides methods for locating controls by role, label, and accessible name, and uses strict matching for operations that require a single target. For business systems, you can change "edit which row" to "locate the row corresponding to the order number, and then find the edit button in the row." The name helps identify the control, and the business number helps identify the object. The two cannot replace each other.
There are both "save activities" and "save contacts" in the simulation activity background, and it is easy to cause ambiguity by asking the model to only look for the first "save". A more robust implementation would check the form, title and target record at the same time. If there are multiple candidates, the situation to be confirmed is returned instead of using positional order to eliminate error reports.
Reread the current status after the page changes
After opening the sidebar in the previous step, the page structure may have changed, and the previously saved screen coordinates and text judgments should not be used directly. The process can reconfirm that the target exists, is available, and belongs to the current task after a critical status change. Waiting a fixed number of seconds can mask partial loading issues, but it does not prove that the page is ready.
It is also necessary to distinguish between "the control can be operated" and "the user has agreed to the operation". A clickable Publish, Pay, or Send button does not automatically give the agent execution permissions. The scope of authorization should be determined separately in the task rules, and the page content should not be allowed to temporarily expand the operation target.
The last check is the business result
Simulate saving contact information. After execution, the saved value and associated records should be re-read to check whether it matches the content confirmed by the user. If the interface reports an error or the result is unclear, you should check the status first to avoid unconditionally clicking again and causing repeated actions.
The troubleshooting record retains the page version, target object, positioning basis, execution time and results, and sensitive fields are kept desensitized. For small teams, these materials can help determine whether the fault comes from web page revision, wrong data or model judgment, instead of rewriting the prompt words every time. Extended reading: Duplicate callbacks and business numbers.