Saturday, June 15, 2013

Selecting Multiple Option at a time from a List

One of the Scenario that is less frequent but comes in picture sometime is when we have to select
a Multiple options from a list Box e.g. you are applying for a job and you have to select Domain in which you are working such as Finance , Retail etc . The below screen will give you an idea

So lets start the Coding for the same . This can be done very easily using the AdvancedUserInteractions
You can read a lot about them Here
We will be using some KeyBoard Actions ( We have to hold CONTROL key and then Click on options which we want to select ) , so the same can be done using ActionBuilders in webdriver.Lets take a look at
the sample code for the same scenario