Error while running my Selenium automation
I cannot completely run my project as it is shown error soon after rendering the web.whatsapp.com
This is my code
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time
driver = webdriver.Chrome('chromedriver.exe')
driver.get("https://web.whatsapp.com/")
wait = WebDriverWait(driver, 600)
target = '"D@D"'
string = "Message sent using Python!!!"
x_arg = '//span[contains(@title,' + target + ')]'
group_title = wait.until(EC.presence_of_element_located((
By.XPATH, x_arg)))
group_title.click()
inp_xpath = '//div[@class="input"][@dir="auto"][@data-tab="1"]'
input_box = wait.until(EC.presence_of_element_located((
By.XPATH, inp_xpath)))
for i in range(100):
input_box.send_keys(string + Keys.ENTER)
time.sleep(1)
Following are the errors :/
DevTools listening on ws://127.0.0.1:7568/devtools/browser/4166a9d5-5e52-4d35-98da-769f457998e7
[17452:12364:1123/234409.011:ERROR:device_event_log_impl.cc(211)] [23:44:09.012] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node
connection: A device attached to the system is not functioning. (0x1F)
[17452:12364:1123/234409.041:ERROR:device_event_log_impl.cc(211)] [23:44:09.041] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node
connection: A device attached to the system is not functioning. (0x1F)