mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

executable_path error #2154

Closed afshinunity closed 5 months ago

afshinunity commented 5 months ago

System

Testcase

`import os import time import requests from PIL import Image from io import BytesIO from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.firefox.options import Options

url = 'https://github.com/mozilla/geckodriver/issues/' output_folder = "/home/afshin/Downloads"

Use Selenium to click the "Show more images" button

profile_path = "/home/afshin/snap/firefox/common/.mozilla/firefox/2cywhn6a.default"

profile_path = "/home/afshin/snap/firefox/common/.mozilla/firefox/2cywhn6a.default" options = Options() options.profile = profile_path

driver = webdriver.Firefox(executable_path='/usr/local/bin/geckodriver', options=options) driver.get(url)`

Stacktrace

TypeError: WebDriver.init() got an unexpected keyword argument 'executable_path'

Trace-level log

whimboo commented 5 months ago

This is a problem with Selenium but not geckodriver. Please consult their documentation.