1
我试图在Milonic菜单中自动选择项目。我使用这样的代码:Milonic菜单:元素在点上不可点击。其他元素将收到点击
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
driver = webdriver.Firefox()
example_menu = driver.find_element_by_id('m_example')
example_menu.click()
# Wait for the "Example Choice" choice to appear
choice_present = expected_conditions.presence_of_element_located((By.LINK_TEXT, 'Example Choice'))
WebDriverWait(driver, 5).until(choice_present)
# Click on "Example Choice"
example_choice = driver.find_element_by_link_text('Example Choice')
example_choice.click()
然而,WebDriverException提高,像这样的消息:
Element is not clickable at point (236, 44). Other element would receive the click