LoginSignup
0
1

More than 3 years have passed since last update.

SeleniumをChromeで開いた話

Last updated at Posted at 2020-10-17

SeleniumをChromeで開いた話

terminal
## Anacondaを使っているので、こちらでseleniumをインストール
python3.8 -m pip install selenium
terminal
## Pythonで画像処理を行う場合に用いられるライブラリをインストール
pip3.8 install pillow
jupyterlab
## jupyter labを起動
jupyter lab

## jupyter lab上で、seleniumがインストールされているかチェック
from selenium import webdriver

## Chromeブラウザを開く
browser = webdriver.Chrome()
terminal
## 「FileNotFoundError...」と怒られたのでChromeドライバーをインストール
brew install chormedriver
jupyterlab
## Chromeブラウザを開か再トライ
browser = webdriver.Chrome()

## また怒られた
#「"chromedriver"は開発元を検証できないため開けません。」
# @apukasukabianさんのHELPを行った。
# https://qiita.com/apukasukabian/items/77832dd42e85ab7aa568

## Chromeを再起動した後、Chromeブラウザを開くか再々トライ
browser = webdriver.Chrome()

#「Chromeは自動テスト ソフトウェアによって制御されています」っていうChromeブラウザ開いた〜


## とりま、jupyter lab上で、pillowライブラリがインストールされているかチェック
from PIL import Image

#(大文字・小文字に気をつけて)
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1