Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another element obscures it
#1
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
Reply
#2
I found, i have double i=i+1 in the loop -.-
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020