public static void Validate.Exists(IElement)

Ask general questions here.
taralex
Posts: 57
Joined: Tue Nov 04, 2008 3:50 pm
Location: Michigan
Contact:

public static void Validate.Exists(IElement)

Post by taralex » Wed Nov 12, 2008 8:41 pm

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?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu Nov 13, 2008 3:31 pm

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