I'm setting up a function that auto scrolls and auto likes on Instagram but when i try run it, it either comes up with an error that element not interactable or element is not attached to the page document
I tried the time.sleep and driver.implicitly_wait to check if it because the elements haven't loaded yet
html = self.driver.find_element_by_tag_name('html')
while True:
button = self.driver.find_element_by_class_name('_9AhH0')
time.sleep(0.5)
html.send_keys(Keys.PAGE_DOWN)
time.sleep(0.5)
try:
button.send_keys(Keys.ENTER)
print("Like")
except Exception as e:
print(e)