[Python] selenium webdriver importing Options giving me an ImportError

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

  1. Stack

    Stack Membro Participativo

    Link to the original code I'm trying to implement into my code.

    Running Selenium WebDriver using Python with extensions (.crx files)

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options

    chop = webdriver.ChromeOptions()
    chop.add_extension('Adblock-Plus_v1.4.1.crx')
    driver = webdriver.Chrome(chrome_options = chop)


    I tried incorporating the code, but the 2nd line,

    from selenium.webdriver.chrome.options import Options


    is tossing out an error

    Traceback (most recent call last):
    File "<pyshell#6>", line 1, in <module>
    from selenium.webdriver.chrome.options import Options
    ImportError: No module named options


    I updated selenium, updated chromedriver, and this problem doesn't go away. I checked stackoverflow and nothing seems to be related to my problem where the module is found.

    Continue reading...

Compartilhe esta Página