Driver Sessions Starting and stopping a session is for opening and closing a browser.
Creating Sessions Creating a new session corresponds with the W3C command for New session
The session is created automatically by initializing a new Driver class object.
Each language allows a session to be created with arguments from one of these classes (or equivalent):
Options to describe the kind of session you want; default values are used for local, but
this is required for remoteSome form of HTTP Client configuration (the implementation varies between languages) Listeners Local Driver The primary unique argument for starting a local driver includes information about starting the required driver service
on the local machine.
Service object applies only to local drivers and provides information about the browser
driver
Java
Python
CSharp
Ruby
JavaScript
Kotlin /examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java
Copy
Close
/examples/python/tests/drivers/test_options.py
Copy
Close
/examples/dotnet/SeleniumDocs/BaseTest.cs
Copy
Close
/examples/ruby/spec/drivers/options_spec.rb
Copy
Close
/examples/javascript/test/drivers/service.spec.js
Copy
Close
Remote Driver The primary unique argument for starting a remote driver includes information about where to execute the code.
Read the details in the Remote Driver Section
Quitting Sessions Quitting a session corresponds to W3C command for Deleting a Session .
Important note: the quit method is different from the close method,
and it is recommended to always use quit to end the session
Java
Python
CSharp
Ruby
JavaScript
Kotlin /examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java
Copy
Close
/examples/python/tests/drivers/test_options.py
Copy
Close
/examples/dotnet/SeleniumDocs/GettingStarted/FirstScript.cs
Copy
Close
/examples/ruby/spec/drivers/options_spec.rb
Copy
Close
/examples/javascript/test/getting_started/firstScript.spec.js
Copy
Close
/examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt
Copy
Close
These capabilities are shared by all browsers.