@gtkx/testing / queryByName
Function: queryByName()
queryByName(
container,name,options?):Widget|null
Defined in: queries.ts:257
Finds a single element matching a widget name without throwing.
Parameters
| Parameter | Type | Description |
|---|---|---|
container | Container | The container to search within |
name | TextMatch | Widget name to match (string, RegExp, or custom matcher) |
options? | TextMatchOptions | Query options including normalization |
Returns
Widget | null
The matching widget or null if not found
Throws
Error if multiple elements match