* 클릭 $historyButton = $driver->findElement(WebDriverBy::cssSelector('#ca-history a')); $historyButton->click(); * 뒤로가기 $driver->navigate()->back(); * 속성가져오기 $driver->findElement(WebDriverBy::xpath('//*[@id="main"]/div/div/a'))->getAttribute('href'); $driver->findElement(WebDriverBy::cssSelector('body'))->getDomProperty('innerHTML'); * html 태그 출력 echo $element->getDomProperty('innerHTML'); 참고url ..
윈도우를 사용하면 웹브라우저(셀레늄)을 보면서 할 수 있어서 좋은것같음! 윈도우에 로컬로 webdriver 사용하기 시작! 1) 윈도우10 셀레니움 설치 참고링크 : https://somjang.tistory.com/entry/WindowsWindows10%EC%97%90-Selenium%EC%84%A4%EC%B9%98%ED%95%98%EA%B8%B0 - 크롬 업데이트 및 버전확인 : 크롬 설정 -> 크롬정보 -> 다시 시작 -> 버전 기억 101.0.4951.64 - 크롬 드라이버 설치 : https://www.selenium.dev/ -> download -> 스크롤 -> Browsers -> chrome -> 아까 확인한 버전이랑 앞숫자가 맞는걸로 - 셀레니움 서버 그리드 설치&실행 : 크롬드라이버..
1) 최신버전 다운로드 https://getcomposer.org/download/ 2) 설치 3) cmd 창에 composer 4) 안되면 환경변수 확인 환경변수 경로가 잘 설정되어있다면 재부팅 하고 다시 3번 과정 실행 4) 프로젝트 폴더로 이동 cd C:\Apache24\htdocs1 5) 아래와같이 컴포저 설치 명령어 ㄱㄱ php composer.phar require php-webdriver/webdriver 참고자료 https://b.redinfo.co.kr/46 https://bug41.tistory.com/76
https://mr-devlife.com/what-is-xpath/
** 참고하면 좋은 php-webdriver API https://php-webdriver.github.io/php-webdriver/latest/Facebook/WebDriver.html
사용환경 - php 8.x - apache 2.4 - centos 7 - 코드이그나이터 사용 라이브러리 https://github.com/php-webdriver/php-webdriver 개발환경 설정 1) 크롬 설치 - 참고자료 : https://passwd.tistory.com/70 wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm # yum install : 패키지 기본 설치 명령 # yum localinstall : rpm 파일 설치 명령 yum localinstall google-chrome-stable_current_x86_64.rpm # Xvfb 설치 yum install xorg-x11-server..
https://devahea.github.io/2019/04/13/Headless-Browser%EB%9E%80/