Jun-14-2020, 08:50 AM
Hi,
I have the code for validate
I have the code for validate
# Validate Like or Unlike btn = driver.find_element_by_xpath( '/html/body/div[4]/div[2]/div/article/div[2]/section[1]/span[1]/button') aria_label = btn.find_element_by_class_name('_8-yf5 ').get_attribute('aria-label') if aria_label == "Like": # Like Photo like_photo = driver.find_element_by_xpath( '/html/body/div[4]/div[2]/div/article/div[2]/section[1]/span[1]/button') like_photo.click() time.sleep(3)