Hi,
Is it possible to use "Touch" action so that it selects a different element each time?
Say for example:
//table/container[3]
Where "3" is the ID of one given element I want to "Touch".
Then, having different containers in my application, is there any way I can indicate Ranorex to randomly pick up "3", or "2", or "1" randomly?
A big thank you in advance.
Action "Touch": Random element
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Action "Touch": Random element
Hello,
You will need to create a UserCodeMethod in order to achieve the mentioned behavior.
For example:
Robert
You will need to create a UserCodeMethod in order to achieve the mentioned behavior.
For example:
Table table = "/table[...]"; IList<Container> myList = table.FindDescendants<Container>(); //Create new Random number Random r = new Random(); int random = r.Next(myList.Count -1); //Touch random entry myList[random].Touch();Regards,
Robert