activities
latest
false
重要 :
请注意此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

用户界面自动化活动

上次更新日期 2024年12月4日

Troubleshooting selectors

描述

A UI Automation activity (e.g. Click, Type Into, etc.) fails with the error message Could not find the UI element corresponding to this selector.

原因

Possible causes for not being able to find selectors in an application:

  • Unselectable UI elements in certain applications.
  • Broken selectors after browser updates.
  • UI changes in target application.
  • Dynamic element properties.
  • Timing issues (slow or unresponsive applications).
  • Unexpected modal pop-ups appearing in the target application.
  • Differences in the environment (development/test vs production).

解决方案

To avoid this issue, you can do the following:

  • Make sure that scaling is set consistently on all environments. We recommend using 100% scaling. In some very rare circumstances, the selector changes based on the scaling settings.
  • Use consistent selector attributes such as aaname, id, and others, as opposed to idx.
  • Check the integrity level of the target application. Integrity levels control trust levels between applications. A low-level application cannot interact with a high-level application. Typically, UI Explorer gives an access denied error when trying to interact with the application, but the automation might just return a selector not found error.
  • Upgrade to the latest activities package for the activity experiencing issues with selectors. Alternatively, you could go through the release notes and search for that activity to identify any applicable version where a bug was fixed.
  • Try adding a delay of two or three seconds before the activity executes via the Delay before property of the specific UI Automation activity. You can also try setting the WaitForReady property to Complete to wait for the entire application to be loaded.
  • If the selectors generated by UI Explorer are not reliable, take one of the following steps:
    • Try different UI Frameworks in UI Explorer: Default, Active Accessibility, UI Automation.
    • Try different input methods: Simulate, ChromiumAPI (for browser automation), SendWindowMessages, HardwareEvents.
    • Fine-tune the selectors by adding or removing nodes or attributes.
    • Try using Unified Target available for modern activities with several targeting methods enabled. Consider activating the Computer Vision targeting method as a fallback and adding anchors for Fuzzy selectors.
    • Try using alternative methods, such as Click Text activities.
    • For automating applications in virtual environments, try using Computer Vision automation.
  • 描述
  • 原因
  • 解决方案
  • Other troubleshooting articles

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
信任与安全
© 2005-2024 UiPath。保留所有权利。