Selenium5 [Ubuntu/Java] Chrome/Selenium 터미널(쉘) 실행 성공한 썰.txt 어제 오늘 붙잡고 있던 에러가 해결됐다 룰루 요즘 한창 리눅스 공부중인데 모르는게 산더미라서 하루종일 구글링구글링구글링vscode구글링빙빙돌아가는~~~회전목마처럼~~~~~ 에러를 많이 겪을 수록 공부도 되고 경험도 되는게 팍팍 느껴진다. 그리고 해결하는게 재밋땅 메이븐이 뭔지 1도 모르던 내가, 우분투 터미널 실행ㅇㅣ 뭔지 1도 모르는 내가 이틀동안 삽질하며 결국 성공한 과정 기록 스타뚜 일단 Maven 프로젝트로 실행하기 전에 클래스 파일을 Run해서 성공하는 것을 목표로 잡음.(부장님 디렉) 초기 샘플 Selenium 실행 파일 (에러잔뜩) package com.first.mavenapp; import org.openqa.selenium.WebDriver; import org.openqa.seleni.. 2024. 1. 19. [Selenium/Java] java.io.IOException : Server returned http response code: 403 for url 에러 첨부파일 형식이 아닌 일반 이미지를 다운받아야 해서 아래와 같은 함수를 만들었다. 이미지주소, 다운받을 경로, 이미지파일 이름을 매개변수로 넘겨주고 최종 저장된 이미지 파일(확장자포함)를 반환하는 함수이다. protected String downloadImage(String imgUrl, String downDir, String name) { try { URL url = new URL(imgUrl); URLConnection uc = url.openConnection(); InputStream is = new BufferedInputStream(uc.getInputStream()); FileOutputStream fos = new FileOutputStream(downDir+File.separator+n.. 2024. 1. 16. [Ubuntu] 우분투 자바 크롬/크롬드라이버/셀레니움 설치 3시간 걸린 개짱나는 설치과정 대략 정리. Ubuntu Java Chrome chromedriver selenium 순서 wls2 설치 참고 https://velog.io/@gidskql6671/WSL-WSL2-%EC%84%A4%EC%B9%98-VSCode-%EC%97%B0%EB%8F%99 WSL & WSL2 설치와 VSCode 연동하기 WSL과 WSL2 설치 및 Remote - WSL을 통한 VSCode와의 연동 velog.io 우분투 설치 vscode와 연동(remote) >> 우분투에 셀레니움 설치 2024. 1. 12. [Selenium/Java] 에러org.openqa.selenium.ElementNotInteractableException: element not interactable | click(), sendKeys(), executeScript() org.openqa.selenium.ElementNotInteractableException: element not interactable 존재하는 요소이지만 클릭이 안되는 경우 나타나는 에러이다. webElement = driver.findElement(By.cssSelector("#searchBtn > img")); // 기존코드 //webElement.click(); // 방법 1. //webElement.sendKeys(Keys.ENTER); // 방법 2. -> 해결 JavascriptExecutor jsx = (JavascriptExecutor) driver; jsx.executeScript("arguments[0].click;", webElement); 가장 흔하게 보이는 해결 방법은 cli.. 2023. 12. 12. [Selenium] 에러 org.openqa.selenium.ElementClickInterceptedException (is not clickable at point. Other element would receive the click) webElement.driver.findElement(By.id("searchBtn")); webElement.click(); org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element ... is not clickable at point (1309, 322). Other element would receive the click: ... 상황: 조회btn(searchBtn)을 click()하지 못하는 에러 element는 찾은 상태이지만 searchBtn으로 focus가 가지 못하는 경우 발생하는 에러이다. 왜냐하면 조회버튼을 눌러야 하는데 datepicker가 닫히지 않은 상태로 진행되어서 조회 버튼에 .. 2023. 12. 11. 이전 1 다음