From the course: Selenium Essential Training

Unlock the full course today

Join today to access over 24,000 courses taught by industry experts.

Inspecting Elements

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…

Contents