初心者で恐縮ですが、よろしくお願いします。
環境 windows10
selenium 3.14
chromedriver
seleniumにてクロームの拡張機能を適用しようとしたところ、以下のエラーが出てしまいます。
PermissionError: [Errno 13] Permission denied: 'C:\Users\namae\venv\evenv\Scripts\hoge
実行したコードは以下です。
Python
1from selenium import webdriver 2from selenium.webdriver.chrome.options import Options 3from selenium.webdriver.support.ui import WebDriverWait, Select 4from selenium.webdriver.support import expected_conditions as EC 5from selenium.webdriver.common.by import By 6from selenium.webdriver.common.action_chains import ActionChains 7import os 8import base64 9 10 11options = Options() 12executable_path = fr'C:\\chromedriver_win32\\chromedriver.exe' 13os.environ['webdriver.chrome.driver'] = executable_path 14options.add_argument('--headless') 15options.add_extension(fr'C:\Users\namae\venv\evenv\Scripts\hoge') 16driver = webdriver.Chrome(executable_path=executable_path, options=options) 17 18driver.get('https://teratail.com/') 19print(driver.current_url) 20driver.quit()
chromedriverに権限がないから、くらいしか原因が思いつかず、Authenticated Usersのフルコントロールにチェックをいれて実行してみましたが、ダメでした。
power shellを管理者権限でも実行してみましたが、同じエラーが出ます。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/01/18 05:07
2019/01/18 05:09