Pooja Patil
Pooja Patil

Reputation: 11

How to launch Firefox browser using selenium python

I am using this python selenium code: from selenium import webdriver

from selenium import webdriver

driver = webdriver.Firefox(executable_path="/home/earth/Downloads/Python/geckodriver-v0.32.0-linux-aarch64 (1)/geckodriver.exe") driver.maximize_window() driver.get("https://www.google.com/")

Upvotes: 1

Views: 3132

Answers (2)

Anmol Parida
Anmol Parida

Reputation: 688

from selenium import webdriver
from selenium.webdriver import FirefoxOptions

opts = FirefoxOptions()
opts.add_argument("--headless")
browser = webdriver.Firefox(options=opts)

try using selenium ~=4.4.0, to remove the executable dependency

Upvotes: 1

Corralien
Corralien

Reputation: 120391

I think your binary version is wrong. You are trying to launch geckodriver.exe which is probably the Windows version of the engine but it seems you are running on Linux.

Use this link to download the geckodriver-v0.32.0-linux64.tar.gz file

Upvotes: 2

Related Questions