Browser Options
ChromiumOptions
pydoll.browser.options.ChromiumOptions
Bases: Options
A class to manage command-line options for a browser instance.
This class allows the user to specify command-line arguments and the binary location of the browser executable.
Initializes the Options instance.
Sets up an empty list for command-line arguments and a string for the binary location of the browser.
arguments
property
writable
Gets the list of command-line arguments.
RETURNS | DESCRIPTION |
---|---|
list
|
A list of command-line arguments added to the options.
TYPE:
|
binary_location
property
writable
Gets the location of the browser binary.
RETURNS | DESCRIPTION |
---|---|
str
|
The file path to the browser executable.
TYPE:
|
start_timeout
property
writable
Gets the timeout to verify the browser's running state.
RETURNS | DESCRIPTION |
---|---|
int
|
The timeout in seconds.
TYPE:
|
add_argument
Adds a command-line argument to the options.
PARAMETER | DESCRIPTION |
---|---|
argument
|
The command-line argument to be added.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ArgumentAlreadyExistsInOptions
|
If the argument is already in the list of arguments. |
remove_argument
Removes a command-line argument from the options.
PARAMETER | DESCRIPTION |
---|---|
argument
|
The command-line argument to be removed.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ArgumentNotFoundInOptions
|
If the argument is not in the list of arguments. |
set_default_download_directory
Set the default directory where downloaded files will be saved.
Usage: Sets the 'download.default_directory' preference for Chrome.
PARAMETER | DESCRIPTION |
---|---|
path
|
Absolute path to the download destination folder.
TYPE:
|
Options Interface
pydoll.browser.interfaces.Options
Bases: ABC