[英]How to check if a button has been clicked using selenium on python
def LikePhotos(self, amount):
bot = self.bot
#if button is being clicked then move to next pic else click then move to next pic
if():
print("Button has already been clicked")
else:
print("Button hasn't been clicked!")
bot.find_element_by_class_name("_9AhH0").click()
這不是 Selenium 的工作方式。 Selenium 可以向瀏覽器發送命令點擊按鈕,但無法檢查按鈕是否被其他方式點擊。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.