Im trying to click the like button with selenium this is the exception error I'm getting:
[-] Passed One Message: Element <span class="glyphsSpriteHeart__filled__16__white u-__7"> is not clickable at point (1039,84) because another element <div class="_2dDPU CkGkG"> obscures it
I have tried solving it with a loop that clicks all of the aria label like elements with Xpath, see my code:
while count <= likes:
try:
likeopt = bot.find_elements_by_xpath("//*[@aria-label='Like'] ")
for likeopti in likeopt:
likeopti.click()
#bot.find_element_by_class_name("fr66n").click()
print("[+] Liked !", count)
count += 1
time.sleep(random.randint(8, 15))
bot.find_element_by_class_name("_65Bje").click()
time.sleep(random.randint(8, 15))
except Exception as e:
try:
bot.find_element_by_class_name("_65Bje").click()
time.sleep(random.randint(3, 7))
print("[-] Passed One", e)
except Exception as x:
bot.find_elements_by_xpath("//*[@aria-label='Close'] ")
continue
print(x,"[+]click on X, finished all posts")
How do you think can it can be solved?
Thanks