3
Chrome의 Selenium WebDriver로 파일을 업로드하는 방법.셀레늄 webdriver. NET 크롬 업로드 파일
버전 Chrome (20.0.1132.57). 버전 chromedriver 22.0.1203.0b 코드
:
driver.GetElement(someXpath).SendKeys(filePath)
가 발생 예외 :
이Element is not clickable at point (144, 90.5). Other element would receive the click: <h2>...</h2>
HTML 코드 : 당신은 요소를 강제 할 수
<a class="button addfile"> Upload <input class="fileupload" type="file" multiple="" name="files[]"/> </a>
클릭 가능하지 않은 요소는 사전에 비활성화되어 있습니까? 그렇다면 SendKeys() –
이 요소가 활성화되어 페이지에서 볼 수 있기 전에 wait 명령을 추가해야 할 수 있습니다. –
이 코드가 제대로 작동하지만 FireFox에서 Chrome에서 테스트를 실행해야합니다. –