Meaghan Lewis demonstrates an example of a test script changing focus to any active alerts on a browser and then how to interact with active alerts and then close them.
- [Instructor] In this video,…I'll demonstrate how to automate opening an alert,…switching to an alert, and then closing it.…To start with, I'll show how the functionality…for the open alert button works.…So from the Switch Window page,…I can click open alert…which opens a browser alert that says this is a test alert…and pressing OK closes that alert.…So now let's write a test to automate this functionality.…I'll start by opening the exercise file for this video.…From the IntelliJ window, I'll select open…and navigate to chapter two 02_06…and I'll open the start directory.…
Once the project is open,…I will go to build, build project,…and wait for that to finish.…Once compilation is successful,…I can go ahead and automate the steps to my test.…So after navigating to the Switch Window page on line 14,…I'll start filling in the steps for the test.…So let's hop back over to the Switch Window page…and what I'll want to do is to inspect the open alert button…and I'll go ahead and grab the id of alert button…and copy that,…
- 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.