일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- 데이터베이스
- java
- postgres
- Linux
- JS
- 윈도우
- node
- 자바스크립트
- 자바
- 설치
- script
- 파이썬
- javascript
- 리눅스
- 스크립트
- Windows
- DATABASE
- 아틀라시안
- hamonikr
- DB
- install
- 우분투
- 하모니카
- ubuntu
- 3.0
- 노드
- python
- Atlassian
- PostgreSQL
- 설정
Archives
- Today
- Total
LukeHan 의 잡다한 기술 블로그
ChromeDriver - ubuntu 본문
반응형
1 전제 조건
$ sudo apt-get update
$ sudo apt-get install -y unzip xvfb libxi6 libgconf-2-4
$ Xvfb :40 -screen 0 1024x768x24 -extension RANDR &
$ export DISPLAY=:40
※ JAVA 8 설치 필요
2 Tesseract-ocr : OCR 용 유틸리티 (브라우저 간 지연 계산을 수행)
$ sudo apt-get install tesseract-ocr
$ sudo mkdir -p /bytedeco/javacpp-presets/tesseract/cppbuild/linux-x86_64/share/tessdata/
$ sudo ln -s /usr/share/tesseract-ocr/tessdata/eng.traineddata /bytedeco/javacpp-presets/tesseract/cppbuild/linux-x86_64/share/tessdata/eng.traineddata
3 Qpsnr : 비디오 품질 계산 유틸리티
$ wget http://qpsnr.youlink.org/data/qpsnr_0.2.5_amd64.deb
$ sudo dpkg -i qpsnr_0.2.5_amd64.deb
4 Chrome
$ sudo apt-get install libxss1 libappindicator1 libindicator7
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome*.deb
$ sudo apt-get install -f
$ vi /opt/google/chrome/google-chrome
>> exec -a "$0" "$HERE/chrome" "$@" >> exec -a "$0" "$HERE/chrome" "$@" --no-sandbox
5 ChromeDriver
$ wget -N http://chromedriver.storage.googleapis.com/2.27/chromedriver_linux64.zip -P ~/
$ unzip ~/chromedriver_linux64.zip -d ~/
$ rm ~/chromedriver_linux64.zip
$ sudo mv -f ~/chromedriver /usr/local/share/
$ sudo chmod +x /usr/local/share/chromedriver
$ sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
6 Selenium
$ wget -N http://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar -P ~/
$ sudo mv -f ~/selenium-server-standalone-3.0.1.jar /usr/local/share/
$ sudo chmod +x /usr/local/share/selenium-server-standalone-3.0.1.jar
$ sudo ln -s /usr/local/share/selenium-server-standalone-3.0.1.jar /usr/local/bin/selenium-server-standalone-3.0.1.jar
$ xvfb-run java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -jar /usr/local/bin/selenium-server-standalone-3.0.1.jar -debug
>> xvfb-run 이 실행중인 상태여야 된다 -> 1의 세 번째 줄
6 JAVA 실행(선택사항)
$ javac -cp "/usr/local/share/selenium-server-standalone-3.0.1.jar" RunnableTest.java
$ java -Dclient.num=10 -Dclient.play.time=1000 -cp .:/usr/local/share/selenium-server-standalone-3.0.1.jar RunnableTest
반응형
Comments