Testing.findWidget

This function will search the descendants of widget for a widget of type widget_type that has a label matching label_pattern next to it. This is most useful for automated GUI testing, e.g. to find the “OK” button in a dialog and synthesize clicks on it. However see gtk_test_find_label(), gtk_test_find_sibling() and gtk_test_widget_click() for possible caveats involving the search of such widgets and synthesizing widget events.

struct Testing
static
findWidget

Parameters

widget Widget

Container widget, usually a GtkWindow.

labelPattern string

Shell-glob pattern to match a label string.

widgetType GType

Type of a aearched for label sibling widget.

Return Value

Type: Widget

a valid widget if any is found or NULL.

Meta

Since

2.14