Meaghan Lewis demonstrates an example of opening a new tab and how to switch to the new tab or window in a WebDriver test. This is helpful knowledge for automating applications that open multiple windows.
- [Narrator] Some applications have multiple windows,…frames, and alerts that open on a page.…Selenium WebDriver assigns each window a unique ID,…so that Selenium can differentiate…when it is switching controls from one window to another.…The switchTo method is provided…by the WebDriver interface and allows the driver…to switch between windows, frames, and alerts.…It offers the following options.…First is the option to switch to a window…by providing the window name as a parameter.…
There's also the option to switch to a frame…by providing the frame name as a parameter.…And third is the option to switch to a pop-up alert.…Now, keep that in mind as I focus on automating a test…for switching to an active window.…I'll start by opening the exercise file for this video,…at 02_05 in the start directory.…Once the project opens, I will start by building the project…by selecting Build, Build Project.…
When that finishes, I'll want to focus now on…filling out the steps of the test.…Now let's hop over to the test application,…
- 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.