test_find_widget


Description:


[ Version ( since = "2.14" ) ]
public unowned Widget? test_find_widget (Widget widget, string label_pattern, Type widget_type)

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 test_find_label, test_find_sibling and test_widget_click for possible caveats involving the search of such widgets and synthesizing widget events.

Parameters:

widget

Container widget, usually a GtkWindow.

label_pattern

Shell-glob pattern to match a label string.

widget_type

Type of a aearched for label sibling widget.

Returns:

a valid widget if any is found or null.


Namespace: Gtk
Package: gtk+-3.0