2

I'm completely new to splinter and quite new to python. I wanted to do a splinter program to automatically log me in to websites once I run the program on a computer. I searched the web a bit for splinter, and I created a program to try and open a web browser and search something in it. However, this error appears:

================= RESTART: C:/Users/hp/Desktop/splinterexp.py =================
Traceback (most recent call last):
  File "C:/Users/hp/Desktop/splinterexp.py", line 4, in <module>
    browser = Browser()
  File "C:\Users\hp\AppData\Local\Programs\Python\Python311\Lib\site-packages\splinter\browser.py", line 123, in Browser
    raise DriverNotFoundError(f'Driver for {driver_name} was not found.')
splinter.exceptions.DriverNotFoundError: Driver for firefox was not found.

This is the code I put in:

from splinter import Browser


browser = Browser()

browser.visit('http://google.com')

Thanks in advance.

Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55
sdog
  • 21
  • 2

1 Answers1

1

According to the Splinter documentation, firefox is the default browser. And according to the error message you provided, you don't have the Firefox web driver installed.

So, you'll either want to install geckodriver, or specify a browser you do have a web driver installed for.

Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55