Skip to main content

OperaGx webdriver with cdc patch.

Project description

OperaGx webdriver with cdc patch.

pip install operagxdriver

    Start the Opera WebDriver and return the WebDriver instance.

    This function starts the Opera WebDriver, which allows you to automate interactions
    with the Opera web browser. It uses the Selenium library and requires the paths to
    the Opera browser executable and the Opera WebDriver executable.

    Important! A CDC patch (from https://github.com/ultrafunkamsterdam/undetected-chromedriver ) is applied before running the EXE file.

    Note: Before running this function, make sure to download the appropriate Opera
    WebDriver version that matches your installed Opera browser version.
    https://github.com/operasoftware/operachromiumdriver/releases

    Args:
        opera_browser_exe (str): The file path to the Opera browser executable.
        opera_driver_exe (str): The file path to the Opera WebDriver executable.
        userdir (str, optional): The user directory for the Opera profile. If provided,
            the browser will use this directory to store the user data (cookies, history,
            etc.). If not provided, the default profile will be used.
        arguments (tuple, optional): Additional command-line arguments to pass to the
            Opera WebDriver when launching the browser. Defaults to a tuple containing the
            following arguments: (
                "--no-sandbox",
                "--test-type",
                "--no-default-browser-check",
                "--no-first-run",
                "--incognito",
                "--start-maximized",
            )

    Returns:
        selenium.webdriver.remote.webdriver.WebDriver:
        The WebDriver instance for the running Opera browser.

    Example:
        from operagxdriver import start_opera_driver

        driver = start_opera_driver(
            opera_browser_exe=r"C:\Program Files\Opera GX\opera.exe",
            opera_driver_exe=r"C:\Users\hansc\Downloads\operadriver_win64\operadriver.exe",
            userdir='c:\\operabrowserprofile',
            arguments=(
                "--no-sandbox",
                "--test-type",
                "--no-default-browser-check",
                "--no-first-run",
                "--incognito",
                "--start-maximized",
            )
        )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

operagxdriver-0.10.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

operagxdriver-0.10-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page