API Reference / @gtkx/testing / queryByObjectProperty
Function: queryByObjectProperty()
queryByObjectProperty<
T>(property,container,text,options?):T|null
Defined in: packages/testing/src/query-helpers.ts:87
Returns the single widget carrying a GObject property whose value matches, or null when none do, the counterpart of DOM Testing Library's queryByAttribute.
Type Parameters
T
T extends Accessible = Widget
Parameters
property
string
Name of the GObject property to read.
container
Widget subtree to search.
text
Matcher for the property's value.
options?
Text matching options.
Returns
T | null
The matching widget, or null when none match.
Throws
When more than one widget matches.