In this video, Meaghan Lewis uses wildcards in locators to identify web elements.
- [Instructor] Using child nodes are helpful … when it is difficult to find a unique … and descriptive locator for an element. … There are a couple ways in which we might want to go about … finding child nodes. … Either using the child node … which is a node directly under another node … or the nth-child … which is used when there are multiple nodes … at the same level under another node. … I'll first talk about an example … of finding a child node. … Take for example the following HTML … where there is a div tag … and directly under that, an a tag. … To find the child element … the selector would be driver.findElement(By.cssSelector, … and inside of quotes, taking the top-level tag name, div, … hashtag, parent space a … to specify the child node there. … Next I'll show an example of using the nth-child. … This is particularly helpful … when there are a list of elements … and we particularly want to find one element within the list. … So take for example the following HTML … where there is an unordered list called list …
- 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.