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?

3 Answers  


How do we analyze the checkpoint results?

0 Answers  


IF there are seven browsers with same name open. I want to close one particular browser thru QTP. how can i do this?

3 Answers   Polaris,


What is QuickTest Automation Object Model? Where we can use AOM?

1 Answers  


Explain qtp(quick test professional)?

0 Answers  


How we can we create a Text checkpoint in QTP 9.1,Actually what i did is first i put in recording mode and gofor Inser menu>Checkpoint>Textcheckpoint>click,Now an hand symbol came and i showed it to some textbox and cliked but the QTP9.1 is giving an error message like "The Obkect you are selecting doesn't support this operation" If i go for Help of QTP 9.1 information I didn't get any solution,pls help me in this issue.

6 Answers  


What is Step generator in qtp? wt is the use? can u any body explain me? plz

1 Answers  


what is object spy

5 Answers   TCS,


How to integrate the qualitycenter with qtp

0 Answers   Wipro,


This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?

0 Answers  


How do we create and run the scripts with out using O.R. ?

5 Answers  


How will you test a stapler?

0 Answers  


Categories