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



There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

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

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

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

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

Answer / prasanna

is it webtable or table in database

Is This Answer Correct ?    1 Yes 1 No

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

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

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

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

There is a table with 4 columns and 10 rows, how to write the script to display the first column r..

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

Post New Answer

More QTP Interview Questions

What is output value? How many types of output values are there in qtp?

0 Answers  


in which situation u will use recording and in which situation u will used to write script manually

1 Answers  


There is one login screen,after accepting valid username and apassword, it will show the next screen. In the 2nd screen u r having 2 combo boxes, U have to select any item from these, and click OK button. After closing that, it will show the 3rd screen. If u click CANCEL button from 2nd screen it will show the first screen. Write QTP script for it???

1 Answers   Sonata,


What are Test case selection criteria for Automation?

2 Answers  


Give me some real time point of way where exactly we can conduct audits?

0 Answers   CTS,


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

0 Answers  


explain qtp framework by taking an example?

3 Answers  


What is the difference between Client/Server application and Web application ?

2 Answers   ArisGlobal,


What are the types of Object Repository’s in QTP?

1 Answers   Crea,


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

0 Answers  


what is framework? which frame work u follow for writting script?

5 Answers   IBM,


In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep then need to check the checkbox ,we don't know the rows and columns ,Can anyone please tell me the answer.

3 Answers   Broadridge, Cigniti Technologies, HCL,


Categories