![](/img/trans.png)
[英]Selenium find_elements returns the same element over and over Python
[英]Python Selenium find_elements not giving me the current element
我在 Python 中使用 Selenium 並循環以不斷檢查row
元素的第一個孩子,因為它不斷變化,但是由於某種原因,當row
的第一個孩子發生變化時, ele
變量仍然保持不變,有什么解決方案嗎?
row = driver.find_elements(By.CLASS_NAME, 'row')[3]
while looprunning:
ele= row.find_element(By.XPATH,"./child::*")
您還必須刷新該row
,
while looprunning:
row = driver.find_elements(By.CLASS_NAME, 'row')[3]
ele = row.find_element(By.XPATH,"./child::*")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.