Meaghan Lewis demonstrates how to automate uploading files in WebDriver test scripts. File upload is something that seems intimidating to automate at first, but can be surprisingly easy.
- [Instructor] File upload automation…seems like something that could be difficult,…but it's actually surprisingly easy.…In this video, I'll use the test application…to upload a file.…On this file upload page,…the functionality that exists allows me to choose a file.…Once I choose a file,…the placeholder text is replaced with the selected filename…and pressing reset clears that text field…and leaves you with a clean slate.…The nice thing about uploading files in Selenium…is that we can simply send keys to the upload field…instead of going through and choosing a file manually.…
So while I'm still on the test application,…I will inspect the file upload field…so I can use it in my test in just a minute.…I'll copy the id of file upload field…and then I'll open up the exercise file…for this video in IntelliJ.…
Once the project is open,…I'll go ahead and build the project.…And then once that's successful,…I'll jump in right after navigating…to the file upload page on line 14…and start by defining a new web element on line 16…
- 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.