selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[🐛 Bug]: selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable

Open Davidgithub1 opened this issue 8 months ago • 2 comments

What happened?

I followed the instruction on https://www.selenium.dev/documentation/webdriver/getting_started/first_script/ using ubuntu on AWS EC2 I got the error: selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable

Are you able to get this to work on Ubuntu on AWS EC2?

How can we reproduce the issue?

from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Firefox()

driver.get("https://www.selenium.dev/selenium/web/web-form.html")

title = driver.title

driver.implicitly_wait(0.5)

text_box = driver.find_element(by=By.NAME, value="my-text")
submit_button = driver.find_element(by=By.CSS_SELECTOR, value="button")

text_box.send_keys("Selenium")
submit_button.click()

message = driver.find_element(by=By.ID, value="message")
text = message.text

driver.quit()

Relevant log output

I got the error: selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable

Operating System

Ubuntu

Selenium version

4.21.0

What are the browser(s) and version(s) where you see this issue?

Firefox and Chrome

What are the browser driver(s) and version(s) where you see this issue?

tutorial doesnt mention these? What am I supposed to do?

Are you using Selenium Grid?

No response

Davidgithub1 avatar Jun 20 '24 04:06 Davidgithub1