Overview
Thestart() 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
Configuration object. If provided, other parameters are ignored.
Path to the user data directory. If not specified, a temporary directory is created.
Run browser in headless mode. Set to
True to run without a visible window.Path to the browser executable. If not specified, nodriver will auto-detect the Chrome/Chromium installation.
Additional browser arguments to pass to Chrome. Format:
["--some-param=value", "--other-param=value"]Enable or disable sandbox mode. When
False, adds --no-sandbox to browser arguments. On Linux as root user, this is automatically set to False.Language string for the browser (e.g., “en-US”).
Host for remote debugging connection. If both
host and port are provided, nodriver connects to an existing browser instead of launching a new one.Port for remote debugging connection. If both
host and port are provided, nodriver connects to an existing browser instead of launching a new one.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.Additional keyword arguments passed to the Config object.
Returns
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
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