Login to flight app, in window flight reservation set the
date field and select flyfrom as Frankfurt and verify
whether flyto list box has the item FrankFurt, log the
results.

Answer Posted / raju

Hi,

If u select "FrankFurt" in FlyFrom, u don't find it again
in FlyTo drop down.

If u want to verify that ...

First generate the script statemnt to select FrankFurt in
FlyFrom fileld.

FlyFromcount= Dialog("Login").window("Flight
Reservation").wincombobox("FlyFrom").getitemscount()

For example if count returns 8, after selecting Frankfurt
from FlyFrom dropdown, now find the items count from FlyTo
dropdown, it will be (count-1), it will be 7 now.

Dialog("Login").window("Flight Reservation").wincombobox
("FlyFrom").select "FrankFurt"

FlyTocount= Dialog("Login").window("Flight
Reservation").wincombobox("FlyTo").getitemscount()

now if u want to verify if FrankFurt is still there or not

for i=o to FlyTocount-1

value = Dialog("Login").window("Flight
Reservation").wincombobox("FlyTo").getitem(i)

If value = "FrankFurt"

msgbox "FrankFurt exists in FlyTo dropdown"

else

msgbox "FrankFurt doesn't exist in FlyTo dropdown"

End If

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use setroproperty?

587


how do we know whether all objects are stored in the object repository or not? how can we know if a particular object is not stored in the repository?

1325


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

1547


hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me

1894


What is checkpoints for quicktest professional (qtp)?

592






Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.

2116


What is the purpose of loading qtp add-ins?

638


Can any body please tell me the steps of keyword driven frame work in qtp. My mail is saswat445@gmail.com please send some materials on keyword driven testing in qtp. thanks a lot...

1804


How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?

646


how to know no.of mails in our g mail by using vb-script

1791


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1422


how interviews will be on QTP?

1534


What is the basic concept of quicktest professional?

550


what is the difference btn risks & Therads in the Test plan documentation?

1603


how to explain a claims and insurance project?

1762