Cascading drop-down lists with selenium

It is very difficult for me to test cascading dropdowns with Selenium. I would like to know what a standard approach is. I don’t understand what commands to use, for example, ClickAndWait, WaitForTextPresent, etc. It seems to be a bit of a hack to try and get it to work.

Has anyone got selenium to properly verify this? An example scenario should be to have 3 lists in which there is a car make, model and color. Each of them is inhabited in turn by the other. Selena needs to somehow wait until the next list is filled before the test begins.

+4
source share
1 answer

Generally, the best way to do this is to do

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

waitForSelectx is just an abbreviation for one of the commands of type waitForSelect. You will need to choose the one that best suits you.

+1
source

Source: https://habr.com/ru/post/1312105/


All Articles