Wildcard in locator

Hello everyone.
I’m using desktop app, the name of the app is changeable so
How can I add wildcard in locator.

You can use regex in locators. Example:

Click   automationid:explorerBarPanel > regex:.*Connect* depth:30

List of available options in documentation

1 Like

depth here refer to what ?!

From documentation linked above:

About search depth

The library does element search depth by default to the level of 8. 
This means that locator will look into 8 levels of elements under element tree of the root element. 
This can lead into situation where element can't be found. 
To fix this it is recommended to set root element which can be found within 8 levels OR defining depth in the locator string to a bigger value, e.g. id:deeplyNestedButton depth:16.
Useful keywords for setting root element are Control Window, Set Anchor and Get Element.
1 Like

ok thank you for your help