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 |
I want to open a GOOGLE page without recording a test in QTP.Can any one answer me?
What is business process testing(bpt) in qtp?
how will you load the test cases in ddt?
give the code to count child objects (Total) in the page
With out using the task manager,how to close the application using vbscript and what is the statement?
If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?
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
what are the disadvantages of descriptiveprograming
what is the frame work in J-meter?
If u r using library files (Instead of Check Points) , How do u do bitmap check ?
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
how to create external data table?