[Python] How to set preferences for Chrome in Selenium Python

Discussão em 'Python' iniciado por Stack, Maio 28, 2025.

  1. Stack

    Stack Membro Participativo

    I am able to set preferences for Firefox as below.

    set_preference = profile.set_preference
    set_preference("network.http.response.timeout", 30)
    set_preference("media.autoplay.enabled", False)
    set_preference("browser.cache.memory.enable", False)
    set_preference("browser.cache.disk.enable", False)
    set_preference("network.proxy.type", 2)
    set_preference("network.proxy.autoconfig_url", pac_url)
    set_preference("network.proxy.autoconfig_url.include_path", True)


    But I need to setup for Chrome as well.. Can any one assist me how to do ?

    Thanks Hafsa.

    Continue reading...

Compartilhe esta Página