The error message is as follows:
The general meaning is that the current element is not clickable, but it does exist on the page, and it may be overwritten by loading selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button data-v-3916f4c2="" type="button" class="el-button el-button--primary" style="width: 100% ; height: 50px; border-radius: 10px; margin-top: 20px;">...</button> is not clickable at point (688, 398). Other element would receive the click: <div data-v- 3916f4c2="" class="login-top">...</div>
Solution 1: Force to wait for a few more seconds
# Can be forced to wait
import time
time.sleep()
Solution 2: Call js directly through selenium
js = driver.find_element(By.CSS_SELECTOR, ‘xxx’)
driver.execute_script(“arguments[0].click();”, js)
Display waiting:
The visibility_of_element_located used here is different from presence_of_element_located
visibility_of_element_located: After the element is found, the width and height of the element must be greater than 0 to execute;
presence_of_element_located: Execute directly after the element is found, maybe the element is covered by a mask, or the loading mask will cause you to be unable to click
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
try:
element = WebDriverWait(driver, 5).until(ec.visibility_of_element_located(loc))
except TimeoutException:
element.click()
Similar Posts:
- Four ways to solve selenium’s error “element is not clickable at point…”
- Selenium: How to Solve Staleelementreferenceexception error (Three Methods)
- selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
- Under Ubuntu system, selenium opens the Firefox browser and prompts’ unable to find a matching set of capabilities. And message: connect
- [Solved] Pycharm Element Locate Error: DeprecationWarning: find_element_by_* commands are deprecated.
- Message: ‘geckodriver’ executable needs to be in PATH. [Solved]
- Ffmpeg scaling — the solution of “width / height not divisible by 2”
- Error reporting in Firefox using selenium in Python
- [Solved] echart Error: Can’t get dom width or height
- Message: stale element reference: element is not attached to the page document error solution