User code: repository elements as parameters?

Class library usage, coding and language questions.
Posts: 5
Joined: Tue Aug 05, 2014 9:15 am

User code: repository elements as parameters?

Post by DominikR » Wed Aug 06, 2014 3:23 pm

Is there any possibility to add repository elemnets as user code parameters?

E.g. something like

Code: Select all

WaitForJQueryDialogClosed( MyRepo.MainWindow.JQueryDialog )
If not, where to put feature requests?

All the best,

Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: User code: repository elements as parameters?

Post by krstcs » Wed Aug 06, 2014 3:43 pm

It is not possible to pass a repo object as a parameter INTO user code from a recording module's action table, however a few people have made similar requests in the forums. Currently there is no information on when or even if this will be possible. If you want to make a feature request, you should send an email to [email protected] as they want to handle feature requests through email instead of the forums.

You CAN pass repo objects between classes/methods once you are IN user code land, just not from the action table into user-code. Only strings are allowed as parameters from the action table.

If you really want to do it, there are work arounds that you can use. Search the forum a bit and you should be able to find some of them. Be warned that they are delicate and can be problematic.

I would suggest that you may want to step back and take a fresh look at what you are trying to do and figure out if there is a better way to structure the repo, your XPaths and/or your tests. I still would like the feature myself, but I have found that it isn't as big of a deal if I structure my tests a bit differently. Crafty RanoreXPaths and repo structures can get around this if you know how everything works together.
Shortcuts usually aren't...