[Python] Is there any way to open extension by link using selenium and avoid chrome blocking?

Discussão em 'Python' iniciado por Stack, Fevereiro 8, 2025.

  1. Stack

    Stack Membro Participativo

    Tests require opening the extension by link.

    Locally I can easily run all my python tests without any problems. When it comes to running it in docker-compose everything works except the moment when I need to open the extension by link. The page is getting blocked by Chrome and I receive "error":"invalid argument" in driver.get(f"{settings.extension_url}/onboarding.html")

    I just need to bypass this blocking.

    I am not using headless mode

    my options:

    options.add_argument(f"--load-extension={os.getcwd()}/temp/build-beta")
    options.add_argument("--no-sandbox")


    So the main questions are:

    1. is it possible in my case?
    2. is it possible in other frameworks for python?

    Continue reading...

Compartilhe esta Página