- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2019-08-26T09:39:36+09:00","default:ryuichi","ryuichi")
* Selenium+ChromeDriverインストール - Ubuntu18.04 [#d2fca887]
#author("2019-08-26T09:42:17+09:00","default:ryuichi","ryuichi")
* Selenium + ChromeDriverインストール - Ubuntu18.04 [#d2fca887]
** Java他インストール [#zaa62edb]
apt-get install -y unzip xvfb libxi6 libgconf-2-4
apt-get install default-jdk
** Google Chromeインストール [#p920b137]
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
apt-get -y update
apt-get -y install google-chrome-stable
** Chromeドライバインストール [#ad5d81b2]
dpkg -l | grep -i chrome
cd /home/selenium/src
wget https://chromedriver.storage.googleapis.com/76.0.3809.126/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromedriver /usr/local/bin/
chmod 755 /usr/local/bin/chromedriver
** Selenium Serverインストール [#pb07c281]
wget https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
cp selenium-server-standalone-3.141.59.jar /home/selenium/selenium-server-standalone.jar
java -jar selenium-server-standalone.jar
(ブラウザ) http://localhost:4444/
** Selenium Server実行 [#xdace639]
xvfb-run java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -jar /home/selenium/selenium-server-standalone.jar
** PHPインストール [#o8df8b4d]
add-apt-repository ppa:ondrej/php
apt update
apt show php7.3
apt install php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mysql php7.3-dev php7.3-mbstring php7.3-zip php7.3-curl
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod 755 /usr/local/bin/composer
** php-webdriverインストール [#j061ed8b]
composer require facebook/webdriver
** 参考 [#xe74be09]
https://tecadmin.net/setup-selenium-chromedriver-on-ubuntu/