[Precondition]

[Steps]

1. Click Select Option (under item Select Value).

2. Select “Group 1, option 2”.

3. Click Select Title  ( under item Select One ).

4. Select “Mrs”.

5. Click red ( under item Old Style Select Menu ).

6. Select Indigo.

7. Click Indigo ( under item Old Style Select Menu ).

8. Select Purple.

9. Click Select… ( under item Multiselect dropdown).

10. Select Green, Blue, Black, Red.

11. Click Volvo, Opel, Audi ( under item Standard multiselect ).

[Expected]

2. Value “Group 1, option 2” is selected & displayed correctly.

4. Value “Mrs” is selected & displayed correctly.

6. Value “Indigo” is selected & displayed correctly.

8. Value “Purple” is selected & displayed correctly.

10. Value “Green”, “Blue”, “Black”, “Red” is selected & displayed correctly.

11. Value “Volvo”, “Opel”, “Audi” is selected & highlight

Create Test precondition

Open website: https://demoqa.com/select-menu

  • Click button “Record script”    to start making “record” at the website.
  • Enter the website link in the text box “Base URL” and Click button “Start Recording”.

Create steps for script

When the URL link is opened, the tool will automatically generate the default steps: open and set window size.

  • Comment “Select Value” command to display part 1.
  • At the dropdown of “Select Option”, click “Group 1, option 2”.
  • Comment “Select One” command to display part 2.
  • At the dropdown of “Select Title”, click “Mrs”.
  • Comment “Old Style Select Menu” to display part 3.
  • Open inspect and select “id=oldSelectMenu”.
  • At comand select “select”, Target get “id=oldSelectMenu”, enter value “label=Indigo” and “value=5”.
  • Comment “Multiselect drop down” to display part 4.
  • At the drop down of “Multiselect drop down” click “Green”, “Blue”, “Black”, “Red”.
  • Comment “Standard multi select” to display part 5.
  • Open inspect, click “id=cars”.
  • At the command, select “add selection”, Target takes “id=car”, input value “Volvo”, “Audi”, “Opel”.

Run Test script

➩  Test script was created and run successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *