Hello,
I need to create a new method to set text in a text field and a second one to select an item from a list.
For both methods I have to set the object(text field or the list) and the value (to type or to select) as parameters.
Could you tell me how is it possible to pass the objects from the object repository to the user code please?
Thank you.
Passing object from object repository to user code methods
-
- Posts: 2
- Joined: Mon Jul 29, 2019 4:52 pm
Re: Passing object from object repository to user code methods
You can right click -> view code to see how Ranorex does it as your basis. I just made a click action on the explorer and then right click -> view code:
You can also make a reference to the repository:
Hope this helps
Code: Select all
public void Mouse_Click_Explorer(RepoItemInfo menubarInfo)
{
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'menubarInfo' at Center.", menubarInfo);
menubarInfo.FindAdapter<MenuBar>().Click();
}
Hope this helps