Selenium报错:selenium.common.exceptions.ElementClickInterceptedException: Message: element click inte

When the UI is automated, the element cannot be clicked in selenium: ElementClickInterceptedException

The original method reported an error:

driver.find_element_by_css('div[class*="loadingWhiteBox"]').click()

The first solution:

element = driver.find_element_by_css('div[class*="loadingWhiteBox"]')
driver.execute_script("arguments[0].click();", element)

The second solution:

element = driver.find_element_by_css('div[class*="loadingWhiteBox"]')
webdriver.ActionChains(driver).move_to_element(element ).click(element ).perform()

According to the actual test, the first one can be solved, the second one has not been tried, and those who are interested can try~

Guess you like

Origin blog.csdn.net/Python_BT/article/details/108365605