The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing


External Resources

More Info

Page tree
Skip to end of metadata
Go to start of metadata

Concluding the Tests

The quit Method

You conclude a test by invoking the quit method on an instance of the WebDriver interface, e.g. on the driver variable. 

The quit method concludes a test by disposing of resources, which allows later tests to run without resources and application state affected by earlier tests. The quit method:

  • quits the web browser application, closing all web pages
  • quits the WebDriver server, which interacts with the web browser
  • releases driver, the variable referencing the unique instance of the WebDriver interface. 


The following example invokes the quit method on the driver variable:

  • No labels