【发布时间】:2021-07-23 19:16:48
【问题描述】:
我正在尝试在 WhatsApp 中创建一个机器人,但我一直遇到NoSuchElementException
我的代码如下:
from selenium import webdriver
Import time
Firefox_browser = webdriver.Firefox(executable_path="/usr/bin/geckodriver")
Firefox_browser.get('https://web.whatsapp.com/')
time.sleep(15)
firefox_browser.switch_to_frame(firefox_browser.find_element_by_name("WhatsAppBot"))
firefox_browser.find_element_by_xpath('//span[@title="WhatsAppBot"]).click()
【问题讨论】:
标签: python selenium bots whatsapp