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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
This is Ajay i  have few douts  if anybody know pls give me 
reply.

1. i have opend 2 gmails i am working with 1 gmail i want 
to close other gmail by usig script.

2.i have 10 links in a page all of them have same 
properties& names i want to click on 5link by using script.

3.i have one combobox in that i want to see all the 
citynames in the combobox and i have to check weather 
hyderabad is present or not.

4. size of objectrepository.
5.what r problems we get during writing the script.
6.is it possible to compare to excel sheets in qtp if 
possible wht is the script.
7.example for lowlevelrecording
 Question Submitted By :: Ajay
I also faced this Question!!     Rank Answer Posted By  
 
  Re: This is Ajay i have few douts if anybody know pls give me reply. 1. i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording
Answer
# 1
1) i have opend 2 gmails i am working with 1 gmail i want 
to close other gmail by usig script.
Ans: Use index property to uniquely indentify the Browser. 
In QTP, for any object, Index starts from Zero. If only one 
browser opened, Index value is Zero. For the second 
browser, index value will be 1 and so on.
The below code will close the second Gmail brower if it two 
or more Gmail Pages are opened. Otherwise It won't close.
If (Browser("title:=Gmail: Email from 
Google","index:=1").Exist) Then
	Browser("index:=1").Close	
End If
If u want to close any broswer, use only index property in 
Browser object




2) i have 10 links in a page all of them have same 
properties& names i want to click on 5link by using script.
Ans: Use index property in descriptive programming so that 
u can perform click action on 5th link.
i.e 
For example, ABCD is the name of the link and page contains 
10 links with the same name ABCD and you want to click on 
5th, this case the below code work. Index starts from Zero. 
So fifth link contains the index value 4.

Browser("title:=Gmail: Email from Google").Page
("name:=Gmail: Email from Google").Link
("name:=ABCD", "index:=4").Click



3).i have one combobox in that i want to see all the 
citynames in the combobox and i have to check weather 
hyderabad is present or not.
Ans: The below code that will verify whether the Item exist 
in the combobox or not. i.e. the given city Hyderabad exist 
in the CityList combobox or not.

CityName = "Hyderabad"
Result = 0
all_items = Browser("Cities").Page("Cities").WebList
("CityList").GetROProperty("all items")
 For Each aitem In all_items
	If aitem = CityName Then
		Reporter.ReportEvent micPass "City is Found 
in the List", "Passed"
		Result = 1
		Exit For
	End If
Next
If Result = 0 Then
	Reporter.ReportEvent micPass "City is Found in the 
List", "Passed"
End If



4) size of objectrepository
Ans: The Size of the Object Repository might be the size of 
the .tsr file in your script.


5) what r problems we get during writing the script
Ans: In general, you can get the following probles while 
preparing the script
1. Sometimes you may not able to find/recognize the unique 
property value of the object.
2. Synchromnization: this is one of the major issue while 
preparing and executing the script.
3. If you have good Automation framework, then only it is 
easier to prepare the scripts
4. It depends on your logic where you are going to 
implement in the script




6) is it possible to compare to excel sheets in qtp if 
possible wht is the script.
Ans: It is possible to verify two Excel sheets in QTP. 
I can explain the Steps to prepare the script.
Step1: Import the first Excel sheet to Gloalsheet, Second 
excel sheet into Local sheet
Step2: Get the rowcount of two Globalsheet and localsheet
Step3: Compare the rowcounts and columncounts of two sheets 
if those are equal, verify each value of the cell.
	If any one combination failed(verifying cell value,
	   Mention that two excel sheets are different
	else
	   Two excel sheets are equal.
Else
Mention that two excel sheets are different




7) example for lowlevelrecording 
Ans: I didnot work on Lowlevel recording, so I don't have 
an idea.
 
Is This Answer Correct ?    1 Yes 1 No
Amarendra Kothuru
 
  Re: This is Ajay i have few douts if anybody know pls give me reply. 1. i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording
Answer
# 2
Small change in Answer for third question 

3).i have one combobox in that i want to see all the 
citynames in the combobox and i have to check weather 
hyderabad is present or not.
Ans: The below code that will verify whether the Item exist 
in the combobox or not. i.e. the given city Hyderabad exist 
in the CityList combobox or not.

CityName = "Hyderabad"
Result = 0
all_items = Browser("Cities").Page("Cities").WebList
("CityList").GetROProperty("all items")
 For Each aitem In all_items
	If aitem = CityName Then
		Reporter.ReportEvent micPass, "City is 
Found 
in the List", "Passed"
		Result = 1
		Exit For
	End If
Next
If Result = 0 Then
	Reporter.ReportEvent micFail, "City is not Found in 
the 
List", "Failed"
End If
 
Is This Answer Correct ?    0 Yes 0 No
Amarendra Kothuru
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?  2
diff between dim & redim ? in detailed? pls any one explain me?  1
In how many ways we can add check points to an application using QTP.  3
how to load the *.vbs (or) test generating script in a new machine? Ordain-Solutions3
explain all the check point in QTP? BirlaSoft1
In an output value text checkpoint, where does the output value stored by default ? Ordain-Solutions4
can u put checpoints for moving images Accenture2
Does QTP is "Unicode" compatible?  2
if i want to check text on the status bar how to test is i need the report also after getting the result weather it is matched or not?  2
what are the areas that cannot be tested using an automated tool? list a few  3
How to capture screen shots when an error occurs?  2
Where we write the FUNCTIONS, in Expert view (or) in any textfiles like Notepad and save it in Library functions folder? How to cal that functions to our script? How to save that functions to Function generator?  3
Where the text version of script file located in file system?  1
How to Test the mainframe application?(tell me few basic things) Covansys1
By default Action1 runs first in QTP. Is it possible to start the run with Action2? Virtusa7
we have one text box and one list box(list box appear in same page or another page) what ever the text enter in text box that must be displyed in list box as first one. for example if we enter 10 in text box that is the 1st item in list box . after that we enter 11 then 11 is the 1st item and 10 is 2nd item. the maximum limit of list box is 10 items. if we enter 11th item the 10th item is deleted and llth one is add as 1st one and 9th one goes to 10th position part2:maore than the answer for this question i want the the reason why testers go for this kind of risk.what is the use of we testers having these kind of attempts.is that not the problem with the developer .pls answer .real time users of tools.in which way these solutions help to test with r without affecting the developed souce code.  3
Give me some scripts for 1). checking webpage links (counting links,opening web pages,counting child elements) CIL2
from where we will retrieve data for data driven tests in qtp?  3
Does QTP support Linux Red Hat? Does QTP support Flash?  3
How u perform exception handling in QTp,what is other name for ths?  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