Hi again,
I have a simple question. I would like to send object\UI elements to user code action function?? Is is possible only by sending xPath as a string??
Paweł
How to send object to user code action
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to send object to user code action
Hi Pawel,
Do you mean as a parameter to the user code action in the recording view?
Regards,
Markus
Ranorex Support Team
Do you mean as a parameter to the user code action in the recording view?
Regards,
Markus
Ranorex Support Team
Re: How to send object to user code action
Hi Markus,
Yes that is what i want to achieve. Additionally, this object can be in recording repository.
Paweł
Yes that is what i want to achieve. Additionally, this object can be in recording repository.
Paweł
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to send object to user code action
Hi Pawel,
This is unfortunately in the recording not possible, you can just use strings as arguments.
Regards,
Markus
Ranorex Support Team
This is unfortunately in the recording not possible, you can just use strings as arguments.
Regards,
Markus
Ranorex Support Team
Re: How to send object to user code action
Am I missing something here?
Could you not pass the object rxpath to the user code and use a FindSingle to see if it is present and get the object pointer?
I must be misunderstanding the requirement. If so, please let me know.
Could you not pass the object rxpath to the user code and use a FindSingle to see if it is present and get the object pointer?
I must be misunderstanding the requirement. If so, please let me know.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to send object to user code action
Hi,
You currently just can pass strings to the UserCode actions of the action table, but in order to pass a RxPath you can convert the RxPath to a String with "toString" or with the "ToResolvedString" method of the RxPath object.
Regards,
Markus
Ranorex Support Team
You currently just can pass strings to the UserCode actions of the action table, but in order to pass a RxPath you can convert the RxPath to a String with "toString" or with the "ToResolvedString" method of the RxPath object.
Regards,
Markus
Ranorex Support Team
Re: How to send object to user code action
Hi orbistest,
It IS possible to send xPath as parameter of user-code-action and everything works fine!
My problem was that i had to explain it to people using recorder who did not know what xPath is and I was interested if its possible to send items from reposiroty directly to user-code-actions.
Paweł
It IS possible to send xPath as parameter of user-code-action and everything works fine!
My problem was that i had to explain it to people using recorder who did not know what xPath is and I was interested if its possible to send items from reposiroty directly to user-code-actions.

Paweł
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to send object to user code action
Hi,
Could it be that you talk about a normal method in a UserCodeModule and not about a UserCode Action from a Recording? Regards,
Markus
Ranorex Support Team
Could it be that you talk about a normal method in a UserCodeModule and not about a UserCode Action from a Recording? Regards,
Markus
Ranorex Support Team
Re: How to send object to user code action
Hi Markus,
Could you please help me. I also wanted to pass the repository item as the argument to my user code.But as the argument is of type string it throws exception. So please suggest how to proceed.
Thanks
Neha.
Could you please help me. I also wanted to pass the repository item as the argument to my user code.But as the argument is of type string it throws exception. So please suggest how to proceed.
Thanks
Neha.
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: How to send object to user code action
Hello,
Could you please describe exactly what you did?
Could you please provide us the exception that you get?
It would be helpful if you provide us the code snippet.
Regards,
Markus (T)
Could you please describe exactly what you did?
Could you please provide us the exception that you get?
It would be helpful if you provide us the code snippet.
Regards,
Markus (T)