Python/Python__Error

Message: element not interactable: element has zero size

말하는감자 2021. 1. 2. 00:17

Message: element not interactable: element has zero size

 

ㅡ_ㅡ 이놈때문에 2021년 새해를 디버깅하면서 맞이했다

 

try:
	btn = self.driver.find_element_by_xpath(<여기에xpath>))
	self.driver.implicitly_wait(5)
except:
	element = WebDriverWait(self.driver, 20).
    until(EC.presence_of_element_located((By.XPATH, <여기에xpath>))))
	self.driver.execute_script("arguments[0].click();", element)
1 2