new to Ranorex and new to C#, hence I've got the following question:
When I pass a repository item into a user code method as Ranorex.Adapter I can use method Click() to click that item.
In my user code method I however ended up with objects of type Ranorex.Core.Element which I want to click.
Let's consider the following example:
Code: Select all
public static void clickParents(Ranorex.Adapter child){
IList<Element> allChildren = child.Element.Parent.Children;
foreach(var childElem in allChildren){
childElem.<insert correct method and args for clicking each child>;
}
}
1. Is there a way to execute a click on an object of type Ranorex.Core.Element?
2. Or alternatively: how do I get an Adapter from the respective Ranorex.Core.Element?
3. Or alternatively: how do I get the parent of an Adapter without ending up with Elements?
Note: there's reason why I don't just pass in the parent to the user code function which is related to the GUI structure of the application under test.
It's not obvious to me how those two classes are related, so if you'd like to shed some light on that, please go ahead...
Many thanks for the help
Cheers
Lawrence