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 get align property of the link on web page?
pls tell me how will you write the vb script in QTP for DataDriven test from Excel sheet for multiple userid and password explain with example
Differenece betwen Project and product ? when company need project or product?
What is source control?
what is the purpose of QTP?
What is the parameterization? Give one example?
How many ways we can parameterize data in quicktest professional?
Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.
how to handle the textboxes where in it should take the sum like ex:: while posting a question in this site it will for what is the result of 6+3=__ where in we have to enter manually 9 and click on submit... but how to handle these cases in qtp.. can someone plz help me out wid dis...
How do you connect to database ,What is the script to connect DATA BASE?
How can we change(increase or decrease)the size of a array variable with out loosing the previous values
1 Answers DST Global Solutions,
How to take screen shot of desktop by using vb script code or is there any method?