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 am using Shared OR, and my collegues are also using Shared OR. How to merge Object Repositories?

6 Answers  


Explain actions in qtp ?

0 Answers  


Hi i want to export the data from applicatioon to excel and later i want to import and use it for my scripts hoe can i do this?

1 Answers  


how to test a java project throughqtp?while testing a vb project we generally do vb scripting. but while testing java project do we use java script .plz some one can send me the manual for it my email roy_samata@yahoo.com thanks in advance

1 Answers  


can any one tell me what is syntax error in line msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist 'code ************** Call login("lal="," " ) wait(5) Call errormsg("Invalid email address. [?]" ) Function errormsg(msg) msgexist=Browser("title:=Gmail: Email.*").Page( "title:=Gmail: Email .*").WebElement(innertext=&msg).exist if msgexist then Reporter.ReportEvent micPass,"enter valid username or pwd ",msg else Reporter.ReportEvent micFail, "entered valid uname and pwd",msg end if End Function

5 Answers  






Given a string variable contain a full name (last name, first name), using vbscripting, how can you extract first and last name and save them into two different variables.

2 Answers   Banking,


Does QTP supports Linux or Unix OS?.If so which scripting is preferable? Shell we do record and playback

1 Answers  


Anybody wants to learn QTP with realtime implementations and complete framework desiging plz contact to this mail id ciraaj@gmail.com

1 Answers  


what are the disadvantages in QTP 9.2?

1 Answers  


can anyone tell me from where i can download qtp demo or crack version

0 Answers  


Can anybody give the script to addsheet, add column,add values under that column in the rows??

5 Answers   AZTEC,


Where the text version of script file located in file system?

1 Answers  


Categories