ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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?
 Question Submitted By :: Dev
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 0 No
Sandipgami84
 
  Re: 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
# 2
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 0 No
Nalini
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what testing activities u may want to automate?  2
I have a string "Redfort is in Delhi" how do u write vbscript for " Delhi in is Redfort"  2
When it be decided to go for either Per - Action or Shared?  2
Does QTP recognize two diff browser's at a time..?if possible how..? Is it possible run scripts on Mozilla which are recorded on IE..?..How..? Semantic-Space10
How to handle the exceptions using recovery scenario manager In QTP?  2
How to pass parameters into an action.Please explain me with examples  4
how you update scripts in qtp?  1
how to insert QTP to display errors and other description in the test results instead of halting execution by throwing error in the mid of executin due to an error (for object not found)? Ordain-Solutions1
Can u explain about QTP framework ACS9
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application  1
What are the file extensions for per-action, shared object repository files and what is the extension for library files? Semantic-Space5
Tell me few important difference Between QTP and WinRunner? Syntel2
How to supress warnings from the "Test results page"?  4
Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri  3
How to export(copy) the entire webtable from the webpage into Excelsheet? using Vb scripting  9
The interviewer asked me when u recorded one application.object repository properties are saved with .tsr extention. in qtp expert view wherever mouse is there that snapshot displayed in active screen but some recored script lines are not displyed in actives screen y? IBM3
Tell me about userdefined functions ?  1
what is active screen,keyboard view? BirlaSoft2
How we can merge the object repositories?say if we have two or three object repositories then how e can merge them? is there any option in Qtp to merge the object repositories BirlaSoft4
How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com