单击指定的用户界面元素。
属性
Common
- ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.
📘备注:
如果“Try Catch 异常处理”* 中包含该活动且“出错时继续”* 属性的值为“True”,则系统在执行项目时不会捕获任何错误。
- “在此之后延迟”****- 执行活动之后的延迟时间(以毫秒为单位)。默认时长为 300 毫秒。
- “在此之前延迟”****- 活动开始执行任何操作之前的延迟时间(以毫秒为单位)。默认时长为 200 毫秒。
- DisplayName - The display name of the activity.
输入
-
“单击类型”****- 指定模拟“点击”事件时所使用的鼠标点击类型(单击、双击、向上滚动、向下滚动)。系统会默认选择单击。
-
“鼠标键”****- 用于执行点击操作的鼠标键(左键、右键和中键)。系统会默认选择鼠标左键。
-
CursorMotionType - Specifies the type of motion performed by the mouse cursor. There are two available options:
- Instant - The cursor jumps to the destination.
- Smooth - The cursor moves in increments. Has no effect if SendWindowMessages or SimulateClick are enabled.
By default, Instant is selected.
-
“Target.ClippingRegion”****- 按照左、上、右、下四个方向定义相对于用户界面元素的剪切矩形(以像素为单位)。支持正数和负数。
-
“Target.Element”****- 使用另一个活动返回的“用户界面元素”变量。该属性不能与“选取器”属性一起使用。该字段仅支持用户界面元素变量。
-
“Target.Selector”****- 用于在执行活动时查找特定用户界面元素的“文本”属性。它实际上是 XML 片段,用于指定要查找的图形用户界面元素及其一些父元素的属性。
-
“Target.Timeout(毫秒)”****- 指定最长等待时间(以毫秒为单位),如果超出该时间后活动并未运行,系统便会抛出“
SelectorNotFoundException”错误。默认值为 30000 毫秒(30 秒)。 -
Target.WaitForReady - Before performing the actions, wait for the target to become ready. By default, Interactive/Complete is selected. The following options are available:
- “无”****- 在执行操作之前,系统不会等待显示除目标用户界面元素之外的任何内容。例如,如果希望只从网页检索文本或单击特定按钮,则可以使用此选项,而不必等待用户界面元素全部加载。请注意,如果按钮依赖尚未加载的元素(如脚本),这可能会产生不良后果。
- Interactive - Waits until only a part of the app is loaded.
- Complete - Waits for the entire app to be loaded.
Misc
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
RPA之家(www.rpazj.com/)是中国具有影响力的R…
选项
- AlterIfDisabled - If enabled, the action is executed even if the specified UI element is disabled.
- “CursorPosition.OffsetX”****- 根据“位置”字段中的选定选项对光标位置进行的水平位移。
- “CursorPosition.OffsetY”****- 根据“位置”字段中的选定选项对光标位置进行的垂直位移。
- “CursorPosition.Position”****- 描述光标的起始点,向其添加“偏移 X”和“偏移 Y”属性的偏移量。可用的选项如下:左上、右上、左下、右下和中间。默认选项为“中间”。
- “修饰键”****- 用于添加修饰键。可用的选项如下:Alt、Ctrl、Shift、Win。
📘备注:
KeyModifiers cannot be used with the SimulateClick or SendWindowMessages options. No error is thrown when executing a workflow that contains an activity with one of these combinations of options.
- “发送窗口消息”****- 如果选中,则系统会向目标应用程序发送一条特定消息,以执行单击。这种输入方法可在后台工作,且兼容大多数桌面应用程序,但并不是速度最快的方法。默认情况下,该复选框是未选中状态。如果既未选中该复选框,也未选中“模拟单击”复选框,则默认方法通过使用硬件驱动程序模拟点击。默认方法速度最慢,且不能在后台工作,但可兼容所有桌面应用程序。
- SimulateClick - If selected, it simulates the click by using the technology of the target application. This input method is the fastest of the three and works in the background. By default, this check box is not selected. If neither this nor the SendWindowMessages check boxes are selected, the default method performs the click using the hardware driver. The default method is the slowest, it cannot work in the background, but it is compatible with all desktop apps. If you select this property, it is recommended to check the state of the target UI element prior to execution. More details can be found on this page.
📘备注:
SimulateClick can only be used with the CLICK_SINGLE and BTN_LEFT input types. Otherwise, an error is thrown when executing a workflow.
Example of using the Click activity
Here you can see how the Click activity is used in an example that incorporates multiple activities.