Home > Software engineering >  Service geckodriver unexpectedly exited. Status code was: -6
Service geckodriver unexpectedly exited. Status code was: -6

Time:12-06

I am using Ubuntu 22.04, and I got this error when I tried to run Selenium tutorial:

selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: -6

And this is the code:

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

driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element(By.NAME, "q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
driver.quit()

Someone can help with the solution? Thanks for your help.

CodePudding user response:

Just to be sure, do you have Firefox installed? Does this thread help for you?

  • Related