In this video, Meaghan Lewis shows an example of why it can be helpful to perform test matching on locators if there aren't any other reasonable locator options.
- [Instructor] When there are no descriptive selectors, … matching by text can come to the rescue. … The two best ways to use a CSS selector based on text … are by value, which will match text by exact value, … there's also wildcard, … which will match text based on … a selector or part of a selector. … In the last video I showed an example … of finding a radio button based on its value. … Just as a refresher, … it looks like driver dot find element by CSS selector, … and then inside of quotes specifying the tag name, … and inside of brackets specifying the type … and setting that equal to its value. … As long as an element has a tag name and a value, … those can be used to locate the element successfully. … If it becomes necessary to match text using a CSS selector, … I recommend using the element's value first. … If the value's not available for some reason, … matching text by wildcard is also acceptable. … Here are the ways that we can match … based on string or substring. … There is the prefix, the suffix, …
- 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.