Whatsapp邮件自动回复

时间:2019-11-13 21:20:30

标签: python

每当有人向我发送消息时,我都会尝试在whatsappweb上自动创建回复。每次我运行代码都不会停止

user = driver.find_element_by_xpath(f'//span[@title = "{name}"]')
user.click()
usrname = 'Mum'
msg_box = driver.find_element_by_class_name('_13mgZ')
kiki = ""
##while True:
##   if kiki != None:
##       break

kiki = wait.until(EC.presence_of_element_located((By.XPATH(f"//span[.='{usrname}']"))))

kiki = driver.find_element_by_xpath(f"//span[.='{usrname}']")
while True:
    if kiki == driver.find_element_by_xpath(f"//span[.='{usrname}']"):
            for i in range(count):

                msg_box.send_keys(msg)
                driver.find_element_by_class_name('_3M-N-').click()
                time.sleep(2)

0 个答案:

没有答案