How do I do this in code? (I'm not using the repository)
Here's what I know while in my function (based on what was passed in).
- The RxPath as a string to the control I want, such as a button, or a combo, or a checkbox
- A string that contains the word for the control, such as "button"
What I was trying to do (not sure it is correct), is something like this:
Public function Click_Adapter(ByVal ControlIndex as enumControls) as boolean
Dim MyElement as Ranorex.Core.Element
Dim MyAdapter as Ranorex.Adapter = Nothing
MyElement = MyControls(ControlIndex).RxPath 'This finds the element
'Note that MyControls(ControlIndex).Type = "Button"
'in this example even though it is not used in my sample code
'This is the part where I don't know what to do
'I cannot click the element because ".click" is not possible on MyElement
'So I figure I need to use an adapter
MyAdapter = Adapter.Create( ???, MyElement) 'What do I put here for adapterType??
MyAdapter.click
end FunctionThanks,
Aracknid