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 Posted / rayudu

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 ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1667


What is the process of synchronizing qtp and aut?

654


Hi, How Accessibility checkpoint in QTP can be implemented in the test script?

1711


What is the script for database check point, bitmapchek point, regular expression ?

1651


What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this

1487






What is system testing and what are the different types of tests you perform in system testing?

701


explain keyword driven framework with banking domain?

1642


Plz Explain AUTOMATION REFERENCE MODEL?

1763


Give me some real time point of way where exactly we can conduct audits?

1585


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1552


What are some test assets and related extensions of qtp?

650


What are the features of quick test pro(qtp)?

623


Which functionalities of QTP used in banking project?

2017


how can we do the frame work in qtp

1687


Explain the views in the QTP GUI?

708