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
 
# Replace below path with the absolute path of chromedriver in your PC
driver = webdriver.Chrome('/home/saket/Downloads/chromedriver')
 
driver.get("https://web.whatsapp.com/")
wait = WebDriverWait(driver, 600)
 
# Replace 'Friend's Name' with the name of your friend 
# or the name of a group 
target = '"Friend\'s Name"'
 
# Replace the below string with your own message
string = "Message sent using Python!!!"
 
arg = '//span[contains(@title,' + target + ')]'
# Searches The Contact Name
group = wait.until(EC.presence_of_element_located((
    By.XPATH, arg)))
group.click()
inp = '//div[@class="input"][@dir="auto"][@data-tab="1"]'
input1 = wait.until(EC.presence_of_element_located((
    By.XPATH, inp)))
for i in range(100):
 # Sends the Message
    input1.send_keys(string + Keys.ENTER)
    time.sleep(1)

@@ -265,19 +265,33 @@
 ace 
-below
+the
  path 
+specified below 
 with
@@ -309,18 +309,18 @@
 te path 
+t
 o
-f
  chromed
@@ -368,41 +368,28 @@
 e('/
-home/saket/Downloads/chromedriver
+PATH/TO/CHROMEDRIVER
 ')%0A 
@@ -894,17 +894,22 @@
 %5D'%0Ainput
-1
+Action
  = wait.
@@ -1019,17 +1019,22 @@
    input
-1
+Action
 .send_ke

Update WhatsApp.py