Check-Element-Exists
Command Description
Determine if any element exists. True = exist. False = not exist
Command Prototype
bRet = UiElement.Exists(objUiElement,optionArgs)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
objUiElement | True | decorator | @ui"" | Feature string of elements |
bContinueOnError | None | boolean | None | Specify whether the automation should continue to support this field even if the activity is incorrect, it is only supported by the Boolean value (true, false) default value |
iDelayAfter | None | number | 300 | Delay time (in milliseconds) after executing the activity is 300 milliseconds |
iDelayBefore | None | number | 200 | The delay time (in milliseconds) before any operations are executed is by default 200 milliseconds |
return
bRet,The variable used to save the output of the command.
Demo
TracePrint "--------------------Determine whether the element exists--------------------"
// --------------------------------------------------------
// [Remarks] To judge whether the element exists, this Demo is to judge whether the search box element of Baidu homepage exists.
// Input parameter 1:
// objUiElement--target element
// Input parameter 2:
// optionArgs--optional parameters (including: error continue execution/delay after execution/delay before execution).Type:Dict
// Output parameters:
// bRet--The variable to which the output of the function call is saved
// Command prototype: bRet = UiElement.Exists(objUiElement,optionArgs)
// --------------------------------------------------------
bRet = UiElement.Exists(@ui"Input Controls<input>5",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
TracePrint(bRet)