开发者

Cascading Dropdown Listboxes with Selenium

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜