Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / bfakruddin

We can do this in two ways...

1. Get all items from two combo boxes and store in two
separate arrays or in DataTable... "Your convenient process"

2. Validate one after the other dynamically in Loop...

I will keep one way here which I feel Logically better

2.

dim exp,act,cmb_1,cmb_2

cmb_1_cnt=browser("...").page("....").weblist
("...").getitemcount

for i=1 to cmb_1_cnt

exp=browser("...").page("...").weblist("...").getitem(i)

call cmb_2_Func()

reporter.reportevent micPass,"Test is Passed","Two
comboBoxes contain Different Items"

Next

Function cmb_2_Func()

cmb_2_cnt=browser("...").page("...").weblist
("...").getitemcount

for i=1 to cmb_2_cnt

act=browser("...").page("...").weblist("...").getitem

if (act=exp) then

reporter.reportevent micFail,"Test is Failed","Two
ComboBoxes contain Same Item"
End For

End if

Next

End Function

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the methods used in UFT to handle exceptions or run-time errors?

1108


Define Error Pane of UFT?

1114


How does qtp identify objects in the application?

1122


What is the syntax for how to call one script from another?

1044


If I change the property value at runtime is it effect is object repository?

1090


Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

3892


Is any limitation to xml checkpoints?

1026


What are the different types of qtp test assets and their extensions?

1171


How to data driven test for Win objects in QTP ?

1934


What are the types of object repository?

1084


Hi ,Can any one pleas explain how to test splash objects using QTP?

2363


How is the Bitmap checkpoint different from Image checkpoint?

1115


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

1326


in data driven testing for performing operations which method is easy from manual test data,keyword view,or from database.and why?

1831


give me the code to save all messages of inbox of gmail into a folder and notepad

2103