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

I want to open a GOOGLE page without recording a test in QTP.Can any one answer me?

4 Answers   IBM,


What is business process testing(bpt) in qtp?

0 Answers  


how will you load the test cases in ddt?

0 Answers  


give the code to count child objects (Total) in the page

1 Answers  


With out using the task manager,how to close the application using vbscript and what is the statement?

1 Answers  






If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?

1 Answers  


What is the use of "New Property" in "Add properties" of testobject properties in object repository. How can i use "New properties" while writing scripts if i have assign some values to the testobject properties Can anyone help me? plz

0 Answers   Livetek,


what are the disadvantages of descriptiveprograming

5 Answers   GE,


what is the frame work in J-meter?

0 Answers  


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

0 Answers  


i am a begnner so am learning Error handling :tried using Recovery manager didnt work i want to be able to handle errors , e.g. if while running the test the folwoing does not show up then how can i use the If then else and goto next step in the test, as in many scenarios it does not show up Browser("The Shopping Channel -").Page("The Shopping Channel -_8").Image("easy pay").Click

0 Answers   Rogers,


how to create external data table?

1 Answers   TCS,


Categories