O'Reilly logo

Selenium WebDriver Practical Guide by Satya Avasarala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Dealing with I/O

In this chapter, we will see how to handle a filesystem using WebDriver in our test scripts. In our web application, there may be scenarios where we have to download files; this is something a test script developer has to deal with while writing test scripts. For this, you may have to work with the filesystem to copy files from one location to another, zip or unzip files, delete directories or files, and so on. Selenium WebDriver provides you a good set of classes to handle the filesystem. In this chapter, we will learn about the following three important classes of WebDriver:

  • FileHandler
  • TemporaryFileSystem
  • Zip

Learning about the FileHandler class

In this section, we will look at different I/O actions that we can perform ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required