Page 1 of 1

User code: repository elements as parameters?

Posted: Wed Aug 06, 2014 3:23 pm
by DominikR
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,
Dominik

Re: User code: repository elements as parameters?

Posted: Wed Aug 06, 2014 3:43 pm
by krstcs
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.