Page 1 of 1

public static void Validate.Exists(IElement)

Posted: Wed Nov 12, 2008 8:41 pm
by taralex
guys, help a noob, how do I validate if an element exists if the corresponding method is void? where do I get the result from?

and one more stupid question:
how do I get the AccessibleName, AccessibleValue, AccessibleState, etc values of an Element object?

Posted: Thu Nov 13, 2008 3:31 pm
by Support Team
The methods in the Validate class throw an exception if validation fails.

The Accessible capability is provided by the MSAA plugin. To use the adapter for a capability provided by a plugin, you have to add a reference to the plugin assambly. I.e., add a reference to the Ranorex.Plugin.Msaa assembly and then use the Accessible adapter, e.g.:

Code: Select all

Accessible myAccessibleElement = "/pathToAnElementWithCapabilityAccessible";
string accName = myAccessibleElement.AccessibleName;
Regards,
Alex
Ranorex Support Team