python - Selenium Error: Element is not clickable at point(X,Y), other element would receive the click -


i using python , selenium. on this link click reply add comment

element not clickable @ point (933.9500122070312, 16.666671752929688). other element receive click: <a href="/create_account"></a>

code given here:

import requests bs4 import beautifulsoup gensim.summarization import summarize

from selenium import webdriver

from datetime import datetime selenium.webdriver.support.ui import webdriverwait selenium.webdriver.common.keys import keys time import sleep      selenium.common.exceptions import nosuchelementexception selenium.webdriver.support import expected_conditions ec selenium.webdriver.common.by import      driver.get(url)     sleep(4)     f = driver.find_element_by_css_selector('.postfull__reply')     f.location_once_scrolled_into_view     f.click() 

update

this how appears in inspector:

enter image description here

your css correct, problem long content scrolls element below of .header why can't click element.

you can location of element , scroll 100px less y coordinate since height of .header 49.5px , better maximize window before testing. see below:

driver.maximize_window() f = driver.find_element_by_css_selector('.postfull__reply') location = f.location["y"] - 100 driver.execute_script("window.scrollto(0, %d);" %location) f.click() 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -