R
R
ReDeNDeR2021-07-30 13:05:39
Python
ReDeNDeR, 2021-07-30 13:05:39

How to add extension to FierFox driver from selenium?

Good afternoon, I'm trying to open extensions with selenium but an error is showing

Traceback (most recent call last): 
  File "C:\Desktop2.0\coding\New folder\Idle.py", line 6, in <module> 
    driver = webdriver.Firefox(firefox_profile=profile) 
  File "C:\Users\Rasul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 170, in init 
    RemoteWebDriver.__init__( 
  File "C:\Users\Rasul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init 
    self.start_session(capabilities, browser_profile) 
  File "C:\Users\Rasul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session 
    response = self.execute(Command.NEW_SESSION, parameters) 
  File "C:\Users\Rasul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute 
    self.error_handler.check_response(response) 
  File "C:\Users\Rasul\AppData\Local\Programs\Python\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response 
    raise exception_class(message, screen, stacktrace) 
selenium.common.exceptions.TimeoutException: Message: No connection could be made because the target machine actively refused it. (os error 10061)

Here is the code
from selenium import webdriver 
from time import sleep 
 
profile = webdriver.FirefoxProfile()  
profile.add_extension(extension='[email protected]') 
driver = webdriver.Firefox(firefox_profile=profile)

Thank you for your attention

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question