📜  python selenium 按文本查找元素 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:12.095000             🧑  作者: Mango

代码示例2
# Find element by it's visible text
driver.find_element(By.XPATH, "//*[text()'the visible text here...']").click()

# Don't forget to import the following module for this to work
from selenium.webdriver.common.by import By