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 |
What is output value? How many types of output values are there in qtp?
in which situation u will use recording and in which situation u will used to write script manually
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???
What are Test case selection criteria for Automation?
Give me some real time point of way where exactly we can conduct audits?
Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in
explain qtp framework by taking an example?
What is the difference between Client/Server application and Web application ?
What are the types of Object Repository’s in QTP?
Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com
what is framework? which frame work u follow for writting script?
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,