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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / nalini
We can use childitemcount method to get the image count in
a cell.
Rcnt=Browser("title:=.*").page("title:=.*").WebTable
(t).RowCount
imgcnt=0
For i=1 to Rcnt
imgcnt = Browser("title:=.*").page("title:=.*").WebTable
(t).ChildItemCount(i, 1, "Image")
Reporter.ReportEvent 0,"imgcount",imgcnt& " images
available in row# "& i & " and column1"
Next
| Is This Answer Correct ? | 0 Yes | 1 No |
If u don't have any Knowledge on perticular application but they give that application to u for Testing ? Then How we wil move towards testing on that application?
Hi Friends,will any body tell to Me for which Auomation Tool their is great Requirement inht eMarket Eithr the QTP or WINRUNNER and for what reason and how long it is going to remain and wat the Scope for the automation Testing In the Future Please tll to Me In Details Ok .
How to connect the real time application application with the QTP?
Can I import a excel sheet in Action1 datatable? How?
Explain the check points in QTP?
Tell me the QTP Advantages and Disadvatages ?
can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com
how to create the varibles and how these are connect to qtp? plz tell me
What is difference between function and procedure?
41 Answers HCL, IBM, iGate, Infosys, TCS, Veritas, Wipro,
How can i check all the button that are enabled in a widnows based application ? What script should i write for this ?
after click on compose mail how can we attached a file in qtp with vbscript code
How to check bitmap output value?