Browser Options
These capabilities are shared by all browsers.
Starting and stopping a session is for opening and closing a browser.
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):
The primary unique argument for starting a local driver includes information about starting the required driver service on the local machine.
WebDriver driver = new ChromeDriver(chromeOptions);
driver = webdriver.Chrome(options=options)
driver = new ChromeDriver(options);
driver = Selenium::WebDriver.for :chrome, options: options
let driver = new Builder()
.forBrowser(Browser.CHROME)
.setChromeOptions(options)
.setChromeService(service)
.build();
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 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
driver.quit();
driver.quit()
driver.Quit();
driver.quit
await driver.quit();
driver.quit()
These capabilities are shared by all browsers.
Learn more or view the full list of sponsors.