Я нахожу
error in "user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))"
Error is: selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//span[@title = "Major project"]"}
(Session info: chrome=81.0.4044.92)
В то время как название группы существует. Пожалуйста, помогите мне. (Я нашел код в канале YouTube: Get Set Python)
from selenium import webdriver
driver = webdriver.Chrome('/home/rockie/Downloads/chromedriver')
driver.get('https://web.whatsapp.com/')
name = input('Enter the name of user or group : ')
msg = input('Enter your message : ')
count = int(input('Enter the count: '))
input('Enter anything after scanning QR code')
user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))
user.click()
msg_box = driver.find_element_by_class_name('_1Plpp')
for i in range(count):
msg_box.send_keys(msg)
button = driver.find_element_by_class_name('_35EW6')
button.click()