Skip to main content

Overview

The start() function is the main entry point for launching a browser with nodriver. You can call it without any parameters to quickly launch a browser instance with best practice defaults.
This is an async function and must be called with await start()

Signature

Parameters

Config
default:"None"
Configuration object. If provided, other parameters are ignored.
PathLike
default:"None"
Path to the user data directory. If not specified, a temporary directory is created.
bool
default:"False"
Run browser in headless mode. Set to True to run without a visible window.
PathLike
default:"None"
Path to the browser executable. If not specified, nodriver will auto-detect the Chrome/Chromium installation.
List[str]
default:"None"
Additional browser arguments to pass to Chrome. Format: ["--some-param=value", "--other-param=value"]
bool
default:"True"
Enable or disable sandbox mode. When False, adds --no-sandbox to browser arguments. On Linux as root user, this is automatically set to False.
str
default:"None"
Language string for the browser (e.g., “en-US”).
str
default:"None"
Host for remote debugging connection. If both host and port are provided, nodriver connects to an existing browser instead of launching a new one.
int
default:"None"
Port for remote debugging connection. If both host and port are provided, nodriver connects to an existing browser instead of launching a new one.
bool
default:"None"
Enable expert mode. When True, includes --disable-web-security and --disable-site-isolation-trials parameters, and enables debugging features like forcing shadow roots to open mode.
dict
default:"None"
Additional keyword arguments passed to the Config object.

Returns

Browser
A Browser instance ready to control tabs and navigate to URLs.

Examples

Basic usage

Headless mode

Custom browser arguments

Connect to existing browser

Expert mode

Notes

When running as root on Linux, the sandbox is automatically disabled. This is required for Chrome to start.
If you provide both host and port, nodriver will connect to an existing browser instance instead of launching a new one.

See also

  • Browser class - The Browser object returned by start()
  • Config class - Configuration object for advanced usage
  • loop() - Create an event loop for running async code