Meaghan Lewis demonstrates how to inspect web elements in a browser and how to use those elements in tests. Finding web elements is a crucial step to being able to successfully write WebDriver tests. When automating tests, time will often be spent inspecting elements.
- [Narrator] Inspecting elements is a must…to be able to identify the web elements…that you plan to use in your test.…This is a crucial step in writing WebDriver tests,…and this is something that you're going to be doing…a lot of throughout this course,…and when writing WebDriver tests in general.…So, I want to take a moment now to show…an example of how to inspect web elements in Chrome.…For this example, I will be using…the simple WebDriver test from the last video…to demonstrate how to inspect a web element.…
And following the simple test,…what I'm first going to do is…to navigate to google.com in Chrome.…Once there, I will hover over the search bar,…right-click, that will open a menu.…And down at the bottom,…I'm going to select the option Inspect.…This opens up the Inspector.…And the first view that we see here…is of all the HTML elements that compose the page.…The line that is highlighted here…is the search bar that we selected to inspect.…
I can see that this is an input element…with many attributes that define it.…
- 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.