내가 웹 페이지에서 특정 링크를 클릭을 시작 셀레늄과 함께 파이썬 스크립트를 작성했습니다에 클릭을 시작 할 수 없습니다. 나의 유일한 의도는 그 링크를 클릭하는 것이다. 몇 가지 방법을 시도했지만 작동시키지 못합니다. 웹 페이지에는 문제가 링크
링크 : 위의 URL을 따르는 경우에
<div class="k-grid-content k-auto-scrollable">
<table class="k-selectable" data-role="selectable" role="grid" style="touch-action: none;">
<colgroup>
<col style="width:100px"/>
<col style="width:210px"/>
<col/>
<col/>
<col style="width:120px"/>
</colgroup>
<tbody role="rowgroup">
<tr class="rowHover" data-uid="1fccd732-cd65-4393-b1be-66786fe9ee60" role="row">
<td role="gridcell">
R016698
</td>
<td role="gridcell">
R-13-0410-0620-50000
</td>
<td role="gridcell" style="display:none">
O0485204
</td>
<td role="gridcell">
GOOCH, PHILIP L
</td>
<td role="gridcell">
319 LIZZIE ST, TAYLOR, TX 76574
</td>
<td role="gridcell" style="display:none">
DOAK ADDITION, BLOCK 62, LOT 5
</td>
<td role="gridcell" style="display:none">
T541
</td>
<td role="gridcell" style="display:none">
</td>
<td role="gridcell" style="display:none">
S3564 - Doak Addition
</td>
<td role="gridcell" style="display:none">
Real
</td>
<td role="gridcell">
<div style="text-align:right;width:100%">
$46,785
</div>
</td>
</tr>
</tbody>
</table>
</div>
: 내있는 내에서 클릭 가능한 링크가 거짓말을해야
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Chrome()
wait = WebDriverWait(driver, 10)
driver.get("use_above_url")
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, ".k-selectable"))).click()
driver.quit()
요소 : URL
스크립트는 내가 함께 시도 당신이 정확한 텍스트 R016698 R-13-0410-0620-50000 GOOCH, PHILIP L 319 LIZZIE ST, TAYLOR, TX 76574
를 포함하는 해당 웹 페이지에서 선을 볼 수 있습니다. 그것이 내가 클릭하고 싶은 곳입니다. 링크 위로 마우스를 가져 가면 그림자가 링크에서 발견됩니다. 내가 원하는 것을 분명히하기를 희망한다. 미리 감사드립니다.
예 예 예 !!! 너는 그랬다. 고마워. – SIM
같은 이름의 다른 클래스가 있다는 것을 어떻게 알 수 있습니까? 매우 궁금한 선생님. 다시 한번 감사드립니다. – SIM
'@ class' name은 고유 한 식별자가 아닙니다. 그것은 HTML 요소에 특정 스타일을 적용하는 데 사용되었으며 동일한 클래스 이름을 가진 많은 요소가있을 수 있습니다 ... 'print (len (driver.find_elements (your_selector)))')를 사용하여 디버깅 할 수 있습니다. 출력에'1' 이상을 얻는다면, 더 구체적인 선택자를 적용해야합니다 – Andersson