![](/img/trans.png)
[英]How to click on button with text Show more results using Selenium and Python?
[英]How to click on link with text See more anyway using Selenium in Python?
要單擊帶有文本See more的元素,您需要為element_to_be_clickable()誘導WebDriverWait ,它會在視圖中自動滾動元素,您可以使用以下定位器策略:
使用XPATH :
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[contains(., 'ee more anyway')]"))).click()
注意:您必須添加以下導入:
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.