Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on How to save a value in runtime into datatable? within the QTP forums, part of the Software Testing category; My program is just to find a dif. b/w two variable and i need to store it in datatable permanently. my code is like this: "a= .. .. b= c=b-a" ...
|
|||||||
|
|||
|
How to save a value in runtime into datatable?
My program is just to find a dif. b/w two variable and i need to store it in datatable permanently.
my code is like this: "a= .. .. b= c=b-a" now i need to store this variable "c" into data table. I have already tried datatable.value("Output",global)=c it stores the value but after running the Column is empty. How can i do it? Is there any alternate? |
| Sponsored Links |
|
|||
|
Re: How to save a value in runtime into datatable?
Hai friend
Method one Add parameter at the runtime and then enter the values. Run time Datatable will only be visible during run time. If you need to view the values present in the datatable then export it to an excelsheet. Dim i DataTable.ImportSheet "C:\Documents and Settings\Deepa\Desktop\Add2.xls",1,1 For i=1 to Datatable.GetRowCount a=DataTable.Value("Num1","Global") b=DataTable.Value("Num2","Global") c =cint(a)+cint(b) e=Datatable.GetSheet ("Global").AddParameter("Sum",c) Datatable.Export("C:\Add1.xls") Method two If you don't need to export the datatable value then you can simply see the run time datatable in this path Excel- This is the name of the test which I have given Res 1- I have executed the test once so I am clicking on Res1 Click on Excel folder->Res 1-> Report->Default.xls In the default.xls you can find run time datatable values here Thanks Deepa |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looping and DataTable | Davis2sa | QTP | 6 | 07-30-2009 09:12 PM |
| datatable.import | rajaputra | QTP | 3 | 06-27-2009 05:02 AM |
| save URL in Global or action datatable | amnak | QTP | 1 | 07-18-2008 01:07 AM |
| Exporting Runtime datatable to excel sheet | ashwinshelke | QTP | 1 | 05-27-2008 04:46 AM |
| Datatable and parameterization | newqtp | QTP | 1 | 04-11-2008 10:43 PM |