There is a table with 4 columns and 10 rows, how to write the
script to display the first column records using qtp? can
anybody help me with script?
Answers were Sorted based on User's Feedback
Answer / kishan
rcnt=Browser().Page().webTable().rowcount
ccnt=Browser().Page().webTable().columncount(2)
for i=1 to rcnt
print Browser().page().webtable().getcellData(i,1)
next
(or)
for i=1 to rcnt
set obj=Browser().page().webtable().childItem
(i,1,"webElement",0)
print obj.getROproperty("text")
next
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / saharsh
clumn name: Name,Studies,rank,status
namColumnname=B("),P("").webtable("").Getcelldata(1,1)
studies=B(").P("").webtable("").getcelldata(1,2)
rank=B(").P("").webtable("").getcelldata(1,3)
status=B(").P("").webtable("").getcelldata(1,4
)
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / gnani
Hi Prasanna,
It is a webtable.
Even I want the script for both webtable and datatable.
Can any help me by sending the script?
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / manas
Dim Conn, rs, ListOfRecords, x
' Connect to the Microsoft Access Database by createing a
object
set conn=CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/DataBase1.mdb" ' ex: Name of DataBase is
DataBase1.mdb
' Retriving data from Access using the SQL Query
' Column_name1 - Suppose first column
' Table - Suppose Name of Table
set rs=CreateObject("ADODB.recordset")
rs.Open "Select Column_name1 from Table", conn
for each x in rs.Fields
ListOfRecords = ListOfRecords & x.Column_Name1 & vbCrLf
next
MsgBox ListOfRecords
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / tvs ramakrishna chowdary
Set con=createobject("adodb.connection")
Set rs=createobject("adodb.recordset")
con.provider="microsoft.jet.oledb.4.0"
Con.open"d:\db1.mdb"
rs.open "select * from cal",con
Do while not rs.EOF
msgbox rs.fields(0)'o is first column
or
msgbox rs.fields("column1_name")
rs.movenext
Loop
Is This Answer Correct ? | 0 Yes | 0 No |
how to display message with out using msgbox function?
what function you write to do database testing with the help of qtp?
Explain the features of quick test pro(qtp)?
We have a text file which contains 1 to 100 numeric values sequentially like 1 2 . . 100 Now we have to count them and transfer to XML file by writing a code in qtp.
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........
I have made the recovery scenario in script. When i am exceuting the script. it stop automatically after running recovery scenario. Please tell the resaon?
I have action1, action2, action3 r there.my query is while executing if i get any error in action1 i want exit from here itself, otherwise execute action2, if i get any error in action2 i want exit from hereitself, like this,what is the method for this?
Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?
Sometimes my QTP scripts works fine and sometimes its not though I am using same shared Repository and am not doing any changes in it.Even though for descriptive programming also its works fine and sometimes it does not work.my application is pretty stable.Could anyone please answer why am facing these types of issue??
How to data driven test for Win objects in QTP ?
How to start recording using quicktest professional (qtp)?