A
A
Aman2019-11-22 21:59:34
Python
Aman, 2019-11-22 21:59:34

How to add selenium extension?

file_ = open(ext, 'rb')
PermissionError: [Errno 13] Permission denied: 'c:\\jjicbefpemnphinccgikpdaagjebbnhg\\2.2.1_0'

I'm trying to add a browser extension, but I'm getting an error.
def __init__(self, path=r'C:\webdrivers\chromedriver'):
        ch = wb.ChromeOptions()
        ch.add_extension(r'c:\jjicbefpemnphinccgikpdaagjebbnhg\2.2.1_0')
        self.driver = wb.Chrome(path, chrome_options=ch)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ScriptKiddo, 2019-11-23
@robick231

The extension must be packaged. CRX format

from selenium import webdriver

chop = webdriver.ChromeOptions()
chop.add_extension("extension_.crx")
driver = webdriver.Chrome(chrome_options=chop)

You can download CRX
Here and Here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question