Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.3K
Views
TypeError: WebDriver.__init__() obtuvo un error de argumento de palabra clave inesperado 'firefox_options' al usar firefox_options como argumentos en Selenium Python

Estoy tratando de crear un script que descargue un archivo de un sitio web y para esto quiero cambiar la ruta del archivo de descarga. Cuando trato de hacer esto con las opciones de Firefox me da este error:

 TypeError: WebDriver.__init__() got an unexpected keyword argument 'firefox_options'

Código:

 from selenium import webdriver from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.keys import Keys import time options = Options() options.add_argument("download.default_directory=C:\\Music") browser = webdriver.Firefox(firefox_options=options, executable_path=r'C:\\selenium\\geckodriver.exe') browser.get('https://duckduckgo.com/')
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

El parámetro de opción del navegador firefox_options quedó obsoleto en Selenium 3.8.0

  • Los parámetros de opciones del navegador ahora están estandarizados en todos los controladores como options . firefox_options , chrome_options y ie_options ahora están en desuso

En su lugar, debe usar options de la siguiente manera:

 from selenium.webdriver.firefox.options import Options options = Options() options.add_argument("download.default_directory=C:\\Music") browser = webdriver.Firefox(options=options, executable_path=r'C:\\selenium\\geckodriver.exe')
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!