Python Forum

Full Version: another element obscures it
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
selenium.common.exceptions.ElementClickInterceptedException: Message: Element <section class="list-item ng-scope"> is not clickable at point (674,633) because another element <div id="cookie-policy-bar" class="group cookie-policy-bar-bottom "> obscures it


Hello ppl, is this message that appears in my program when I try to run.
The program do the first loop but when go to second appears this....


def my_function(i,driver):
	while i<a:
		i=i+1
		print ("select")
		element=driver.wait.until(EC.presence_of_element_located((By.XPATH,f[i])))
		driver.find_element_by_xpath(f[i]).click()                              #is this line the error
               
        print ("selected")
		try:
			driver.wait.until(EC.presence_of_element_located((By.XPATH,"/html/body/div[2]/main/div[1]/div/div/div/div[3]/div/section[9]/div/div[1]/div/form/input")))
			driver.find_element_by_xpath("/html/body/div[2]/main/div[1]/div/divdiv/div[3]/div/section[9]/div/div[1]/div/form/input").click()
		except NoSuchElementException as e:
			print("no have, try 9")
			driver.wait.until(EC.presence_of_element_located((By.XPATH,"/html/body/div[2]/main/div[1]/div/div/div/div[3]/div/section[8]/div/div[1]/div/form/input")))
			driver.find_element_by_xpath("/html/body/div[2]/main/div[1]/div/divdiv/div[3]/div/section[8]/div/div[1]/div/form/input").click()           
		
		import time 
		time.sleep(2)
		driver.back()
		i=i+1
		import time
		time.sleep(3)
		pass

	pass
I found, i have double i=i+1 in the loop -.-