웹 사이트에서 selenium
의 버튼 요소를 찾으려면 python 3
에 있습니다. 나는 다른 방법을 시도했지만 모두 실패했습니다. 내 요소를 찾기 위해 Xpath
를 사용하지만 더 나은 방법인지 모르겠어 :셀렌 찾기 버튼 요소
이것은 HTML
코드 :
br.find_element_by_xpath("//input[@id='place_order']").click()
:
<div id="review-buttons-container">
<div class="columns">
<div class="please-wait" id="review-please-wait" style="display:none;">
<span>PROCESSING...</span>
</div>
<input id="place_order" type="button" value="Complete Order" class="button end"/>
</div>
</div>
내가 이미 파이썬에 무엇을하려고이
반환 :
selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (606, 678). Other element would receive the click :
...
//div[@id='review-buttons-container']/div/input
반환 :
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//div[@id='review-buttons-container']/div/input"}
br.find_element_by_xpath("//form[2]/div[8]/div/input").click()
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//form[2]/div[8]/div/input"}
어떤 생각? 당신이 xpath
를 사용하지 않을 경우 당신은 그것을 클릭하기 전에 요소로 이동 ActionChains
을 사용할 수 있습니다 덕분에