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 |
What is clean sweep?
How to launch application under test through VBscript without using systemutil.run or invokeapplication?
What is the architecture of framework
HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...
I m in new and want to learn QTP. Is any website which provide free QTP video training.....also can downlaod....
Hi, I Install QTP 9.2 in windows Vista. but it is not supporting IE. it is supporting only windows based application. could I change any setting in Vista for supporting IE.. ?? thanks in advance...
Hi Small doubt . i am working as Contract employee in XYZ comany thrw ABC Consultancy. so. How i write my resume ? In Professional experience Column. plz send urgent
How can we import a Open Office excel file in QTP
what are the mandatory and assistive properties of objects in QTP?What is attached text?Plz assist me with proper answer.
Plz explain about Virtual object? What is the situation u r using , explain with example?
am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)
what is the script to select 2 or more than 2 options from a listbox.