lecture 3 of 160 completed

Managing the browser session

Starting and quitting a browser per test is your job in Selenium. Doing it wrong leaks browsers and blocks the machine.

What you'll learn

  • Why a failed test can leave a browser running
  • Where to put start and quit so they always run
  • How to reuse a browser without leaking state

In Selenium you create the browser yourself. That means you also have to close it, and this is where real damage happens.

Look at this test:

members only

Keep reading with the full course

The Foundations track and the first 5 lectures of each framework are free. This lecture is part of the paid course, which unlocks every lecture, all three frameworks, and downloads.

See the options →