I would appreciate a little help from my friends in the user community. First, I am not a developer, so please don't get too technical. I have a recording that I want to Get Value of the Current Date and Time, and then Set Value of the variable I've created and add 30 seconds to it. I have attached a screen shot of the recording.
Any tips would be most appreciated.
How do I Get Value and then Set Value
How do I Get Value and then Set Value
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I Get Value and then Set Value
Hello,
This needs to be done using a User Code action.
You would only need to create this method in a Recording.UserCode.cs and call it via 'User Code' action.
It will log the current time, add 30 seconds and log this new time into report.
Markus (T)
This needs to be done using a User Code action.
You would only need to create this method in a Recording.UserCode.cs and call it via 'User Code' action.
It will log the current time, add 30 seconds and log this new time into report.
public void getCurrenTtime() { System.DateTime curTime = System.DateTime.Now; // get current time Report.Info("Current time:" + curTime.ToString()); curTime = curTime.AddSeconds(30); // add 30 seconds Report.Info("New time: " + curTime.ToString()); }Regards,
Markus (T)
-
- Posts: 5
- Joined: Wed Oct 23, 2013 10:55 am
Re: How do I Get Value and then Set Value
Then what is use of GET VALUE property which is in the "Add new action" tab?
Can we use GET VALUE to get the text value from the pop up window. Then export this value to the external excel sheet.
For example:- We run a recording after some time this will give a pop up window in which we will get a text value. now i want to store that value into external excel sheet? but how? using renorex tool. Kindly guide me. I have attached a screen shot of the recording.
Can we use GET VALUE to get the text value from the pop up window. Then export this value to the external excel sheet.
For example:- We run a recording after some time this will give a pop up window in which we will get a text value. now i want to store that value into external excel sheet? but how? using renorex tool. Kindly guide me. I have attached a screen shot of the recording.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I Get Value and then Set Value
Hi,
In general it should be possible to export it to Excel.
In order to create a Get Value action select the specific repo item which represents the element where the value is shown and drag and drop it to your action table and select Get Value. Then you just need to select the right attribute, where the specific value is saved to, and a variable where the value of the specific attribute should be saved to.
Regards,
Markus
In general it should be possible to export it to Excel.
In order to create a Get Value action select the specific repo item which represents the element where the value is shown and drag and drop it to your action table and select Get Value. Then you just need to select the right attribute, where the specific value is saved to, and a variable where the value of the specific attribute should be saved to.
Regards,
Markus
-
- Posts: 5
- Joined: Wed Oct 23, 2013 10:55 am
Re: How do I Get Value and then Set Value
Hi Markus,
I would appreciate a little help from my friends in the user community. Can u tell me which Attribute i have to choose to get the text value from pop up window. I tried with each of the Attribute but unable to get the text value from the pop up window.
I am a tester kindly don't go in depth.
As i have to test 1200 test cases, and every time I want the text value i.e. "False" or "True" from the pop up window. Kindly guide me.
Regards,
Amit kumar
I would appreciate a little help from my friends in the user community. Can u tell me which Attribute i have to choose to get the text value from pop up window. I tried with each of the Attribute but unable to get the text value from the pop up window.
I am a tester kindly don't go in depth.
As i have to test 1200 test cases, and every time I want the text value i.e. "False" or "True" from the pop up window. Kindly guide me.
Regards,
Amit kumar
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I Get Value and then Set Value
Hi,
Without additional information about the control I am not able to tell you which attribute you need to use, but you can use the Spy tool to check if there is an attribute which is set to the specific value.
If you need further assistance/guidance I would need a Ranorex snapshot file of the window.
This will help me to tell you if there is an attribute which contains the text.
Regards,
Markus
Without additional information about the control I am not able to tell you which attribute you need to use, but you can use the Spy tool to check if there is an attribute which is set to the specific value.
If you need further assistance/guidance I would need a Ranorex snapshot file of the window.
This will help me to tell you if there is an attribute which contains the text.
Regards,
Markus