2

Hi I continue to get the error, ElementClickInterceptedException: Message: Element is not clickable at point (x,y) because another element obscures it

I have tried many work arounds including a time delay and nothing seems to work. i tried some of the solutions here: Selenium Web Driver & Java. Element is not clickable at point (x, y). Other element would receive the click

then I get a new error, "cannot scroll down"

Appreciate any help. Here is my code:

from selenium import webdriver
import time

    browser = webdriver.Firefox()
    browser.get('https://keepa.com/#!')
    browser.implicitly_wait(2)
#login to site
    isbn = browser.find_element_by_id('panelUserRegisterLogin').click()
    isbn = browser.find_element_by_id('username')
    isbn.send_keys('xxxx')
    isbn = browser.find_element_by_id('password')
    isbn.send_keys('xxxx')
    isbn = browser.find_element_by_id('submitLogin').click()
  #open search bar and lookup asin

    isbn = browser.find_element_by_id('menuSearch').click()
    isbn = browser.find_element_by_id('searchInput')
    isbn.send_keys(xxxx)
    isbn.submit()
Alexis
  • 89
  • 2
  • 9
  • can you point at which line error occurred? – Dev Oct 06 '19 at 11:37
  • @Dev ElementClickInterceptedException: Message: Element is not clickable at point (769,34) because another element – Alexis Oct 06 '19 at 11:56
  • I got the error message from your question, what i asked is when executed the code at which line this error thrown? – Dev Oct 06 '19 at 11:59
  • @Dev ElementClickInterceptedException Traceback (most recent call last) in () 24 25 ---> 26 isbn = browser.find_element_by_id('menuSearch').click() 27 isbn = browser.find_element_by_id('searchInput') 28 isbn.send_keys(asina) – Alexis Oct 06 '19 at 12:04

2 Answers2

0

As I mentioned earlier it's duplicate of the Element is not clickable at point (x, y), where you can find detailed reasons and explanation of the error.
Here's correct code:

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec

browser = webdriver.Chrome()
wait = WebDriverWait(browser, 5)

browser.get("https://keepa.com/#!")

#login to site
wait.until(ec.element_to_be_clickable((By.ID, "panelUserRegisterLogin"))).click()
browser.find_element_by_id("username").send_keys("xxxx")
browser.find_element_by_id("password").send_keys("xxxx")
browser.find_element_by_id("submitLogin").click()

#open search bar and lookup asin
wait.until(ec.invisibility_of_element_located((By.ID, "loginOverlay")))
wait.until(ec.element_to_be_clickable((By.ID, "showSearchBar"))).click()

search_input = wait.until(ec.element_to_be_clickable((By.ID, "searchInput")))
search_input.send_keys("xxxx")
search_input.submit()
Sers
  • 12,047
  • 2
  • 12
  • 31
0
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser=webdriver.Chrome()
browser.get('xxxxxxxx')
# ↓this
browser.find_element_by_class_name("searchbtn").send_keys(Keys.ENTER)

I also encountered this problem Here is my workaround

kerwenard
  • 1
  • 1