【发布时间】:2019-12-17 22:26:08
【问题描述】:
我想点击元素“项目”以显示下拉列表(见下图) 在其他地方使用 python 中的 selenium 库时出现错误:
could not be scrolled into view
例如,使用以下代码获得:
driver = webdriver.Firefox()
driver.get(url)
driver.find_element_by_xpath('//div[@class="multiselect-container"]').click()
或者在我等待元素显示的地方使用一些代码,例如这里描述的: Message: Element <option> could not be scrolled into view while trying to click on an option within a dropdown menu through Selenium
mySelectElement = WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.ID, "edit-projects")))
mySelectElement.click()
但我无法让它工作。
任何将不胜感激。
html源代码可以在这里找到:
【问题讨论】:
标签: python html selenium firefox button