Learning about the TemporaryFilesystem class

In this section, we will see the temporary filesystem that WebDriver uses. As the name suggests, the files that are created under temporary filesystem are temporary; that is, the files are deleted as soon as your test script is executed.

Understanding the default temporary filesystem

WebDriver generally uses your AppData\Local\Temp folder as your temporary filesystem on Windows. But we can figure that out. There is a method in the TemporaryFilesystem class that will show the default temporary filesystem that is being used by WebDriver. The API syntax for that method is as follows:

public static TemporaryFilesystem getDefaultTmpFS()

The preceding method will return the TemporaryFilesystem class based on ...

Get Selenium WebDriver Practical Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.