Selenium 설치하기 - pip 위치로 이동, Selenium Client 모듈 설치, Browser Driver 설치, PATH경로상에 추가하기, 개발도구 종료 후 다시 시작

CODEDRAGON Development/Python

반응형

  

Selenium 설치하기

·       pip 위치로 이동

·       Selenium Client 모듈 설치

·       Browser Driver 설치

·       PATH경로상에 추가하기

·       개발도구 종료 후 다시 시작

 

pip 위치로 이동

파이썬이 설치된 폴더 하위에 Scripts 폴더에 위치해 있습니다.

C:\Python\Python36-32\Scripts

 

cd C:\Python\Python36-32\Scripts

C:\CodeLab>cd C:\Python\Python36-32\Scripts

 

C:\Python\Python36-32\Scripts>

 

 

Selenium Client 모듈 설치

pip install selenium

C:\Python\Python36-32\Scripts>pip install selenium

Collecting selenium

  Downloading selenium-3.4.3-py2.py3-none-any.whl (931kB)

    100% |████████████████████████████████| 942kB 922kB/s

Installing collected packages: selenium

Successfully installed selenium-3.4.3

 

C:\Python\Python36-32\Scripts>

 

 

 

Browser Driver 설치

사용할 브라우저별 Selenium 드라이버를 설치합니다.

드라이버가 설치된 후, 해당 드라이버의 경로를 실행 PATH에 넣어 줍니다.

아래는 대표적인 브라우저별 설치 링크이다. 특별한 이유가 없다면 Selenium이 가장 잘 동작하는 Firefox를 사용하는 것이 좋습니다.

Browser

설치경로

Firefox

https://github.com/mozilla/geckodriver/releases

Chrome

https://sites.google.com/a/chromium.org/chromedriver/downloads

Edge

https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/

 

 

Firefox Browser Driver 설치

페이지의 "Downloads"영역으로 이동합니다.

운영체제의 비트 수에 맞는 zip파일을 다운로드 합니다.

https://github.com/mozilla/geckodriver/releases


 


 

다운 받은 zip파일을 특정 폴더에 압축 해제 합니다.

C:\Python\Modules


 

 

 

Chrome Browser Driver 설치

"Latest Release:"에 있는  ChromeDriver x.xx 링크 클릭

https://sites.google.com/a/chromium.org/chromedriver/downloads


 

운영체제에 맞는 파일 다운로드


 


 

다운 받은 zip파일을 특정 폴더에 압축 해제 합니다.

C:\Python\Modules


 

 

 

PATH경로상에 추가하기

C:\Python\Modules 폴더의 경로를 실행PATH경로상에 추가합니다.


 

  

시스템 환경 변수 설정하기(참고)

http://codedragon.tistory.com/2594

 



 

개발도구 종료 후 다시 시작

eclipse 종료 후 다시 시작.


 

 

 

직접 다운로드

chromedriver_win32.zip

geckodriver-v0.18.0-win64.zip

 

반응형