Look here for setup.
Can test again to make sure it work as,see the there extra step eg
Can be
Keep all update.
I have to use this as it switch languages
Can test again to make sure it work as,see the there extra step eg
caps["marionette"] = True
.Can be
False
if using older FireFox browser.Keep all update.
pip install -U selenium FireFox ver 67.0 geckodriver-v0.24.0
from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.keys import Keys import time #--| Setup options = Options() #options.add_argument("--headless") caps = webdriver.DesiredCapabilities().FIREFOX caps["marionette"] = True browser = webdriver.Firefox(options=options, capabilities=caps, executable_path=r"geckodriver.exe") #--| Parse or automation browser.get('https://duckduckgo.com') input_field = browser.find_elements_by_css_selector('#search_form_input_homepage') input_field[0].send_keys(f'car{Keys.RETURN}') time.sleep(3) images_link = browser.find_elements_by_link_text('Images') # Name Images in your country images_link[0].click() time.sleep(5) browser.quit()So this work fine for me,also it open FireFox search for car and show images of cars.
I have to use this as it switch languages
Bilder(Norway) == Images
browser.find_elements_by_link_text('Bilder')