In a webtable, lets say there are 10 records and 1 column.
let say "image" is available for 1st,2nd and 3rd records and
4th onwards image is not available. How to recognise for
that cell image is available or not?
Answer Posted / sandipgami84
Hi, U need to pass only column no, for which column u want
to check, image is exist or not, cop below function and Pass
your 'Column No' as a perameter
Public Function isGridImageExist(Column_No)
Dim Browser_Page
Set Browser_Page = Browser("title:=.*").page("title:=.*")
RowCount = Browser_Page.WebTable("html id:=playlist").RowCount
GetTotalPage =
Browser_Page.WebEdit("name:=pageno").GetROProperty("default
value")
GetMaxPageNumber = trim(right(GetTotalPage,2))
For J=1 to GetMaxPageNumber
For i=1 to RowCount
GetCellData=Trim(Browser_Page.WebTable("html
id:=playlist").GetCellData(i,1))
Set Img = Browser_Page.WebTable("html id:=playlist","html
tag:=TABLE","index:=8").ChildItem(i,Cstr(Column_No),"Image",0)
If (Img.Exist(2)) Then
Img.Click
isGridImageExist = 1
GetCellData=Null
Set Browser_Page = Nothing
Exit Function
End If
GetCellData=Null
Next
Browser_Page.Image("file name:=next.jpg").click
wait(2)
Next
Set Browser_Page = Nothing
End Function
Sandip Gami
Cell No: 9714177088
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How many types of trigger events are there in qtp?
To which environments does quicktest professional supports?
Explain the concept of object repository and how quicktest professional recognises objects?
what is the advantages and disadvantages of using functions instead of re usable actions
Is it possible to split an action? How?
How many ways we can parameterize data in quicktest professional (qtp)?
what is the diffrence bw qtp architectute and qtp framework?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
How to run a test using quicktest professional (qtp)?
how do i know how to use tools
Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?
what frame work you are following?
what is clean sweep?
Explain how you can find length of array in qtp?
How to create Reusable and Multiple Actions?