Wait for/Validation against repo element

Ask general questions here.
dugovic.milan
Posts: 41
Joined: Wed Jun 29, 2016 1:19 pm
Location: Frankfurt, Germany
Contact:

Wait for/Validation against repo element

Post by dugovic.milan » Fri Feb 10, 2017 4:11 pm

Hey guys. I need to get this scenario going or to be precise take advantage of these two methods:

- Wait for
- Validate


So I have a repo element that is "Text" Adapter a it has to be verified after few seconds as soon as he appears on the screen. As for AccessibleName I need to use variable's value so I can use it as a custom method with any argument. The main advantage of using WaitFor is that Ranorex continues only then when he finds the match (at that particular time and no additional time is wasted), but unfortunately Validation validates straight after execution and Test Suite eventually fails if the particular element is not on the screen at the moment. The problem I have is that neither of these methods doesn't have an input argument which could be replaced with the value of AccessibleName's property... I'm clueless at this point, really :roll:

Any ideas?
Ranorex 8.3.0

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Wait for/Validation against repo element

Post by Stub » Mon Feb 13, 2017 9:38 am

Use both? WaitForExists then Validate? Wrap them both up in a WaitForExistsThenValidate routine? Both use a RepoItemInfo in some way, and that repository item will reference the @AccessibleName field. The Validate call can be passed the appropriate attribute and expected value.