tags:

views:

90

answers:

1

I am having great difficultly testing cascading dropdown boxes with Selenium. I would like to know what the standard approach is for this. I'm a bit unclear as to which commands to use i.e. ClickAndWait, WaitForTextPresent etc. It seems a little bit of a hack to try and get this to work.

Has anyone got selenium to correctly test this out? An example scenario would be to have 3 listboxes which have Car Make, Model and Colour. Each one is populated in turn by the other. Selenium needs to somehow wait for the next listbox to populate before preceeding with the test.

+1  A: 

What is normally the best way to do this is to do

Select | select1 | option
waitForSelectx | select2 | possiblePattern
Select | select2 | option
waitForSelectx | select3 | possiblePattern
Select | select3 | option

the waitForSelectx is just shorthand for one of the waitForSelect type commands. You will need to pick the one that works best for you.

AutomatedTester
thanks I will give that a go.
Jon