Micro Focus QTP (UFT) Forums
how to store data in datatable from other application? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: how to store data in datatable from other application? (/Thread-how-to-store-data-in-datatable-from-other-application)



how to store data in datatable from other application? - vimal singh - 07-16-2010

I have written a script which finds the nos. of link on the iGoogle webpage and storing its name in datatable. Issue is that it stores the name of the link but its getting replaced by other name. I want to store the name of all the links in datatable eg .(1st link name shd store at (R1, C1) other link name should store at (R2, C1) and so on. Column 2 stores the expected result. And How to compare the actual with expected result one by one and if it finds some difference it shd color the expected cell.

====================
Code:
Set des = description.Create
des("html tag").value = "A"
Set clink= Browser("name:=iGoogle").Page("title:=iGoogle").ChildObjects(des)

c=clink.count

msgbox " the no. of links are: "&  c

For i=0 to clink.count-1

    x=clink(i).GetROProperty("name")

datatable.Value("actual",dtglobalsheet)=x
wait 2
Next



RE: how to store data in datatable from other application? - Saket - 07-16-2010

use 'Datatable.SetCurrentRow' to set the current row you want to write.


RE: how to store data in datatable from other application? - vimal singh - 07-16-2010

Thanks saket for your reply. I want that row should be increased by 1 with every test data so that at the end of my test run All the 81 links name should be there not only the last name