find_first#

omni.kit.ui_test.find_first(
path: str,
) List[WidgetRef]#

Find first omni.ui Widget or Window by search query.

button = ui_test.find_first("Stage//Frame/**/Button[*]")
await button.click()
Parameters:

path (str) – Search query path to locate the first widget or window.

Returns:

Widget or Window wrapped into `WidgetRef` objects.

Return type:

List[WidgetRef]