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   To Refer this Site to Your Friends   Click Here
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
Hello! i am having two comboboxes.Each having 10 items in 
it.when i select first item in first combobox,it is not 
similar in the second combobox.for ex in first combo if it 
is Hyderabad,in second it should be some chenai or some 
other item .Write a VBSCRIPT for that?
 Question Submitted By :: Sumanthkumar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Hello! i am having two comboboxes.Each having 10 items in it.when i select first item in first combobox,it is not similar in the second combobox.for ex in first combo if it is Hyderabad,in second it should be some chenai or some other item .Write a VBSCRIPT for that?
Answer
# 1
Lets take Combo1 & Combo2

If u r selecting < Item1 > from Combo1 the same item1 
should not be present in the Combo2 right..
if it is the case

step1) select Item1 from Combo1
Step2) write a function to validate the given item i.e 
passed as perameter(Item1)by getting the innertext of the 
Combo2 and use Instr function to find Item1 is there in the 
inner text..if no Pass...If yes Fail.........


if the case is
the item selected in the combo2 should not be <item1>
then

get the selected item from the Combo2

strcomp("selected item","item1")

if yes fail
if no pass.
 
Is This Answer Correct ?    2 Yes 1 No
Ravikumar
 
  Re: Hello! i am having two comboboxes.Each having 10 items in it.when i select first item in first combobox,it is not similar in the second combobox.for ex in first combo if it is Hyderabad,in second it should be some chenai or some other item .Write a VBSCRIPT for that?
Answer
# 2
suppose in our flight reservation window "Fly from" 
and "Fly To" comboboxes values should not be same.ok.
In taht situation below code will give all fail status 
because Our flight reservation window has both values same 

Just understand the code and implement it on ur application

SystemUtil.Run "C:\Program Files\Mercury 
Interactive\QuickTest 
Professional\samples\flight\app\flight4a.exe","","C:\Program
 Files\Mercury Interactive\QuickTest 
Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "rayudu"
Dialog("Login").WinEdit
("Password:").SetSecure "49192ea21d0ec541ad12119e494c01ba2bb
d510b"
Dialog("Login").WinButton("OK").Click

a=window("Flight Reservation").WinComboBox("Fly 
From:").GetROProperty("items count")

b=window("Flight Reservation").WinComboBox("Fly 
From:").GetROProperty("all items")

a1=window("Flight Reservation").WinComboBox("Fly 
To:").GetROProperty("items count")

b1=window("Flight Reservation").WinComboBox("Fly 
To:").GetROProperty("all items")

spl=split(b,vblf)
spl1=split(b1,vblf)
For i=0 to a-1
val=spl(i)
msgbox val
val1=spl1(i)
msgbox val1
If val=val1 Then
	reporter.ReportEvent micFail,"Step1","Test case is 
fail"
	Else
	reporter.ReportEvent micPass,"Step1","Test case is 
pass"
	End If
Next
 
Is This Answer Correct ?    3 Yes 0 No
Rayudu
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How would you parameterize the text field "Country" and the same "country" when it appears as combo field on other page with text field city and same with City combo field? Adobe1
Hi, How to invoke QTP or any application through Command Prompt without using Vb script and batch file.... Reply me Srinivas Excel3
What is the difference between check point and output value.  3
How to execute a WinRunner Script in QTP? IBM1
Can anybody give the script to addsheet, add column,add values under that column in the rows?  2
I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?  1
Give me some scripts for 1). checking webpage links (counting links,opening web pages,counting child elements) CIL2
1. Can anyone help me with recovery scenarios, each type with examples and also what is on error resume next?  1
Is it possible to run QTP scripts created in IE 6.0 in IE 7.0? TCS4
What is the difference between functional spec. and Business requirement specification? Infor4
How we can merge the object repositories?say if we have 2 or 3 object repositories then how we can merge them?Is there any option in QTP to merge the object repositories?  2
datatable.Import("E:\Programming Samples\QTP Samples\OrderNumbers.xls") Asume we have 4 records in datatable Code reads the 4 rows in the sheet ok, but does it 5 times? It doesn't sound like closing the datasheet is the problem Can we close the datasheet runtime ?  1
What is the difference between Call to Action and Copy Action? Satyam1
What are SetToProperty, SetRoProperty, GetToProperty scripting?  1
is qtp 9.2 create the scripts with the application run on mozilla firefox browser?  2
what is the use of automation objective model?where is used? plz tell me  1
Does QTP work in UNIX environment BirlaSoft3
Can i get a simple example exercise for update run mode for sample flight application......... In qtp when i try to run the test in update mode.. Auotmation> update option is disabled............ Pls let me know ................. Thanks in advance.....  1
hai, i am doing QTP by own. So, i am confident in checkpts,synchronization, data driven test, recovery scenarioe manager etc. but actually i don't know how all these we wil implement while we r writting code manually. when we r doing practice, while recording code is automatically generated but in real time i heard that we have to write the script.But i don't know how it is? How to write descriptive prog.? plz. tel me what r the basic things we have to know? explain how to write descriptive prog.? explain me with an example pls....... Vertex2
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
 
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