Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



In a webtable, lets say there are 10 records and 1 column. let say "image" is available f..

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

In a webtable, lets say there are 10 records and 1 column. let say "image" is available f..

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

Post New Answer

More QTP Interview Questions

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?

16 Answers   Genpact, HP,


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 .

2 Answers  


How to connect the real time application application with the QTP?

2 Answers  


Can I import a excel sheet in Action1 datatable? How?

2 Answers   IBM,


Explain the check points in QTP?

2 Answers  


Tell me the QTP Advantages and Disadvatages ?

1 Answers  


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

0 Answers  


how to create the varibles and how these are connect to qtp? plz tell me

3 Answers  


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 ?

1 Answers  


after click on compose mail how can we attached a file in qtp with vbscript code

0 Answers  


How to check bitmap output value?

0 Answers  


Categories