public static void Validate.Exists(IElement)

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

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: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

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;
Ranorex Support Team