Meaghan Lewis gives an example of when multiple CSS attributes will be necessary to find and interact with elements if no other viable options are available.
- [Instructor] Using multiple CSS selectors can be necessary…when a web page has many of the same type of elements,…and the CSS selector needs to describe a unique element,…and there are no other good options.…There are many different combinations of CSS selectors…that can be used to locate elements.…In this video I'll discuss the following:…tag and class or tag and ID,…tag and attribute, class and class.…But besides the few I cover, there are so many more.…
Let's talk about using tag and class together.…Say I have a simple text field where the html is defined…as input class is equal to q, type is equal to text.…As shown in the last video, I could simply use class name,…but say the class name is used somewhere else…and I want be a little bit more specific…and use the tag name as well to define this…CSS selector.…So I can use a combination of the two…and I can say driver dot find element by CSS selector…and in quotes I can say input, using the tag name dot q…to also describe the class.…
The same convention can be followed in situations where…
- Using browser drivers and WebDriver
- Inspecting elements
- Selecting a locator
- Combining multiple CSS attributes
- Using common components
- Implicit and explicit waits
- Automating workflows
- Testing behaviors
- Using page objects
- Connecting to GitHub
- Running on the grid
- Using cloud-based testing tools
Skill Level Intermediate
1. Review Fundamentals
2. Succeeding with WebDriver
3. Using Advanced Locators
4. Interacting with Components
5. Synchronization Issues
6. Putting It All Together
7. Project Integration
Next steps1m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.