课程: Selenium Essential Training

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Dropdown menus

Dropdown menus

- In this video, I'll demonstrate how to automate a typical dropdown menu, using Selenium Web Driver. On this dropdown page, in the test application, there is a single button on the page called Dropdown button. Clicking this button exposes a dropdown menu that has a list of all the components used within the test application. Clicking on a component in the dropdown list takes me to that component's page and the test application. Let's write a test to automate selecting an option from the dropdown menu. I'll start by opening up the exercise file for this video. And once the test is open, I will select to build the project, and after that completes successfully I'll start filling in the details for the dropdown test class. I'll start on line 15 after the driver navigates to the dropdown page. I wanted to find a new web element that's going to be called dropdown menu. And to get the locator for this dropdown menu element I'm gonna hop back over to the test application to inspect this…

内容