Table of Contents |
---|
...
...
Selenium 설치
UI 프로젝트에 selenium node 모듈 추가
yarn install chrome driver geckodriver selenium-side-runner selenium-webdriver
When faced jest envrioment error.
ChromeDriver 설치
Change directory to a temp folder.
cd/tmp/
Get ChromeDriver using wget
sudo wget https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip
Unzip ChromeDriver
unzip chromedriver_linux64.zip
Move ChromeDriver to the bin applications folder.
sudo mv chromedriver /usr/bin/chromedriver
설치 확인
chromedriver --version
google chrome 설치
go to temp
cd /tmp/
Install using curl
curl https://intoli.com/install-google-chrome.sh | bash
sudo mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
설치 확인
google-chrome --version && which google-chrome
Jest 에러 발생시 설정 추가
Code Block |
---|
"jest": { "setupFiles": [ "./test/jestsetup.js" ], // "snapshotSerializers": [ // "enzyme-to-json/serializer" // ], "testEnvironment": "jest-environment-selenium", "setupTestFrameworkScriptFile": "jest-environment-selenium/dist/setup.js" }, |
Install in AWS EC2-user
Installing ChromeDriver
Change directory to a temp folder.
Get ChromeDriver using wget
Unzip ChromeDriver
Move ChromeDriver to the bin applications folder.
Code Block |
---|
# move to /tmp
cd/tmp/
# download chrome driver
sudo wget https://chromedriver.storage.googleapis.com/83.0.4103.39/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/bin/chromedriver
# check version
chromedriver --version |
Install google chrome
move to temp
install using wget
Code Block |
---|
# move to /tmp
cd/tmp/
# download google chrome
curl https://intoli.com/install-google-chrome.sh | bash
sudo mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
# check version
google-chrome --version && which google-chrome |
The configuration
...
Selenium 설정
has been configured Chrome for Linux, Firefox for UI tester.
...
yarn run test-chrome:dev
...
Result
Success
Failed
...
...