select 来自 python 硒列表的标签

select a label from a list with selenium in python

我想 select 或从以下代码中写入所需的选项“Leads”: ´´´

Leads Leads Prospecting Prospecting Alimentación y Gran Consumo Prospecting Textil y Moda Prospecting Viajes y Turismo 未找到匹配项。考虑更改搜索查询。 未找到管道

´´´

对于python:

text = driver.find_element_by_xpath(element_xpath).get_attribute('text')

试试下面的代码:

driver.get("https://baud.teamwork.com/launchpad/login?continue=%2Fcrm")
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input#loginemail"))).send_keys("usernaame")
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input#loginpassword"))).send_keys("pwd")

driver.find_element_by_class_name("w-button--blue").click()

WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//body//div//div//header//div[1]//div[1]//button[1]"))).click()