fedupwithinsta
Newbie
- Feb 27, 2023
- 7
- 0
I've been trying to like the posts in my feed by using Selenium but so far have had no luck
Here is my code:
like_buttons = chrome.find_elements_by_xpath("//article//section//button//*[@aria-label='Like']")
for button in like_buttons:
button.click()
time.sleep(1)
I get this error:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
I also tried this:
wait = WebDriverWait(chrome, 30)
like_buttons = wait.until(EC.visibility_of_all_elements_located((By.XPATH, "//article//section//button//*[@aria-label='Like']")))
for button in like_buttons:
button.click()
time.sleep(1)
and it gave me TimeoutException
Here is my code:
like_buttons = chrome.find_elements_by_xpath("//article//section//button//*[@aria-label='Like']")
for button in like_buttons:
button.click()
time.sleep(1)
I get this error:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
I also tried this:
wait = WebDriverWait(chrome, 30)
like_buttons = wait.until(EC.visibility_of_all_elements_located((By.XPATH, "//article//section//button//*[@aria-label='Like']")))
for button in like_buttons:
button.click()
time.sleep(1)
and it gave me TimeoutException