Selenium + ChromeDriverインストール - Ubuntu18.04Java他インストールapt-get install -y unzip xvfb libxi6 libgconf-2-4 apt-get install default-jdk Google Chromeインストール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ドライバインストール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インストール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実行xvfb-run java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -jar /home/selenium/selenium-server-standalone.jar PHPインストール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インストールcomposer require facebook/webdriver 参考 |
|