Hi,
i have a field(item) which is dynamically changing each time i run,so i want to capture this value and paste the same value in the other field.So how can i do this.
I am using record and playback.
How To capture Dynamic variables
How To capture Dynamic variables
Last edited by upendra on Tue Oct 27, 2015 5:01 pm, edited 1 time in total.
Re: How To capture Dynamic variables
Hi,
Could you please post a Ranorex snapshot of the element in question? Screenshot is unfortunately not very useful here.
If you want to capture the value from that field and use the value in the same module, you can use simple Get/SetValue action. If you want to use the obtained value between multiple modules, you can use for example the approach described here:
http://www.ranorex.com/blog/sharing-dat ... to-another
Could you please post a Ranorex snapshot of the element in question? Screenshot is unfortunately not very useful here.
If you want to capture the value from that field and use the value in the same module, you can use simple Get/SetValue action. If you want to use the obtained value between multiple modules, you can use for example the approach described here:
http://www.ranorex.com/blog/sharing-dat ... to-another
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How To capture Dynamic variables
Hi odklizec,
Please find the screenshot as an attachment.
Thanks !
Regards
Upendra
Please find the screenshot as an attachment.
Thanks !
Regards
Upendra
You do not have the required permissions to view the files attached to this post.
Re: How To capture Dynamic variables
Thanks for the snapshot.
Here is the xpath to the element with text you want to get...
/form[@title~'^Oracle\ Retail\ Merchandisi']//container[@caption~'^Item\ Maintenance\ Window\ \ ']//container[@type='FScrollBox']//text[@accessiblename='Item']
So add this element to repository. Now you have to add GetValue action to recording module.
In Recording module, go to "Add New Action" combo and select "Get Value" item. Eventually, Drag&Drop the repo element to recording table and from the appeared context menu select "Get Value". Then you need to select "Text" attribute, which contains the text you are looking for. Finally, you need to create a new module variable, in which will be the obtained value stored. Then you can use this variable where you want.
What I'm not quite sure about is what would happen if there is a text before the separator? The thing is that on the screenshot, there appears to be two individual text labels? However, in posted snapshot, there seems to be just one text element recognized?
Here is the xpath to the element with text you want to get...
/form[@title~'^Oracle\ Retail\ Merchandisi']//container[@caption~'^Item\ Maintenance\ Window\ \ ']//container[@type='FScrollBox']//text[@accessiblename='Item']
So add this element to repository. Now you have to add GetValue action to recording module.
In Recording module, go to "Add New Action" combo and select "Get Value" item. Eventually, Drag&Drop the repo element to recording table and from the appeared context menu select "Get Value". Then you need to select "Text" attribute, which contains the text you are looking for. Finally, you need to create a new module variable, in which will be the obtained value stored. Then you can use this variable where you want.
What I'm not quite sure about is what would happen if there is a text before the separator? The thing is that on the screenshot, there appears to be two individual text labels? However, in posted snapshot, there seems to be just one text element recognized?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: How To capture Dynamic variables
Hi odklizec ,
Thanks for your Reply.It is working as expected.
Regards
Upendra
Thanks for your Reply.It is working as expected.
Regards
Upendra
Re: How To capture Dynamic variables
You are welcome 

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration