From the course: Selenium Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
File upload - Selenium Tutorial
From the course: Selenium Essential Training
File upload
- [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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.