Click here to Skip to main content
15,887,843 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello.I want (first step of my app) to open a link using firefox.
Using the code below ,firefox opens a window and then I get an error in my terminal.What I do wrong?
When I Ctrl+c the terminal I get this error:
Python
clicker.py:4: DeprecationWarning: executable_path has been deprecated, please pass in a Service object
  driver = webdriver.Firefox(executable_path = "/usr/bin/firefox")
^CTraceback (most recent call last):
  File "clicker.py", line 4, in <module>
    driver = webdriver.Firefox(executable_path = "/usr/bin/firefox")
  File "/home/nikos/.local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    self.service.start()
  File "/home/nikos/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 103, in start
    sleep(0.5)
KeyboardInterrupt

Thanks in advance.

What I have tried:

Python
from selenium import webdriver


driver = webdriver.Firefox(executable_path = "/usr/bin/firefox")
link_site = "https://google.gr/"
driver.get(link_site)
Posted
Updated 4-Feb-22 2:28am

1 solution

The first thing to do in such cases is to Google the error message: DeprecationWarning: executable_path has been deprecated - Google Search[^]. The chances are that someone (or someones) have seen this before and may have hints or even solutions.
 
Share this answer
 
Comments
Nick_is_asking 4-Feb-22 8:34am    
I already found the solution.Anyway.thanks for your time.
Richard MacCutchan 4-Feb-22 8:37am    
Well how about posting it here so other people can benefit?
Nick_is_asking 4-Feb-22 8:38am    
All I had to do was to follow these steps from this link:
https://www.youtube.com/watch?v=xgsFwaw9W4Q&ab_channel=Python-Bug

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900