0

the error info:

Element found: {element} Element is not clickable at point (795, 4915)

my code is :

from selenium import webdriver
from selenium.webdriver.common.by import By    
from selenium.webdriver.support import expected_conditions as EC    
from selenium.webdriver.support.ui import WebDriverWait    
from selenium.common.exceptions import TimeoutException    
import time

url_base = 'http://www.christies.com/lotfinder/searchresults.aspx?&searchtype=p&action=paging&searchFrom=header&lid=1&entry=lama&pg=all'    
driver = webdriver.Chrome()    
driver.get(url_base)        
driver.switch_to.frame("signupFrame")    
driver.find_element_by_id("close_signup").click()    
time.sleep(2)        
driver.switch_to.default_content()    
wait = WebDriverWait(driver, 10)

try:
    element = wait.until(EC.element_to_be_clickable((By.ID,'loadAllUpcomingPast')))    
    print('Element found: {element}')    
except TimeoutException:
    print('could not find loadAllUpcomingPast')

driver.find_element_by_id("loadAllUpcomingPast").click()

enter image description here

Andersson
  • 51,635
  • 17
  • 77
  • 129
  • Please set a pdb.set_trave before the click and check in the browser if you can see the object without scrolling and click it yourself. This will help to find the problem. – jhinghaus Nov 23 '17 at 08:15
  • Try to add `element.location_once_scrolled_into_view` after `print('Element found: {element}') `. Also note that you should not use `driver.find_element_by_id("loadAllUpcomingPast").click()` outside of `try` block, but use `element.click()` inside `try` instead – Andersson Nov 23 '17 at 08:33

0 Answers0