ClickButtonWithLabel

Click a Windows button Control with a label containing the required text.

void ClickButtonWithLabel(string label);

Parameters

label: The automation element for this button must contain this label as the Name value

Return Value

None

Remarks

This action operates on a standard Win32 button using the windows message BN_CLICKED.

For buttons that do not respond to this Windows message, another action such as LeftClick() or a shortcut key using SendKeys() should be used.

Example

Control setupDialog = FindTopWindow("Page Setup", "#32770"); // find dialog by caption and window class

setupDialog.ClickButtonWithLabel("Cancel"); // click the cancel button

Related:

 

This topic was last updated on January 13, 2022, at 02:42:23 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant