From the course: Advanced Selenium: Support Classes
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Quick wins - Selenium Tutorial
From the course: Advanced Selenium: Support Classes
Quick wins
- [Instructor] The support classes have a lot of content, some of which we can cover very quickly because they are nice, self-contained pieces of functionality. In this video, we'll quickly look at Select, which is a WebElement abstraction, by ID or name which is a custom by-selector, quotes for creating Xpath quoted locators and colors for working with colors from CSS. Other parts of the support classes we'll go into in more detail later, But first let me jump to this test the can select an option using select, this is a fairly complicated piece of code between lines 54 and 64. Line 54 finds a select menu, line 56 gets all the option elements and then on line 57 we click on the third one which is a index too, and then line 59 uses the JavaScript executor to find the index of the selected item and asserts on the value. That's a little to complicated so I'll simplify that using the select class let's then see…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.