title: Exception has occurred: TypeError 'WebElement' object is not subscriptable
body: <p>Hello guys I'm really a <strong>newbie</strong> to python and I just writing a piece of code that opens <em><strong>Whatsapp</strong></em></p>
  <p>and you give it the person's name and the message then sends how many times you want.</p>
  <p>But when I start debugging the code it gives me this:</p>
  <p><code> Exception has occurred: TypeError 'WebElement' object is not subscriptable File &quot;E:\Iliya\My Courses\Python\Projects\Whatsapp Robot\Whatsapp_Bot.py&quot;, line 15, in &lt;module&gt; msg = driver.find_element_by_class_name('_3FRCZ')[1]</code></p>
  <pre><code># ======================================
  from selenium import webdriver
  PATH = 'C:\\Program Files (x86)\\chromedriver.exe'
  driver = webdriver.Chrome(PATH)
  driver.get('https://web.whatsapp.com/')
  
  input(&quot;Please Press The 'Enter' Button... &quot;)
  name = input(&quot;Enter Person's Name: &quot;)
  msg = input(&quot;Enter The Message: &quot;)
  counter = int(input(&quot;How Many Times Do You Want To Repeat The Message?:  &quot;))
  
  user = driver.find_element_by_xpath('//span[@title = &quot;{}&quot;]'.format(name))
  user.click()
  msg = driver.find_element_by_class_name('_3FRCZ')[1]
  for i in range(counter):
      msg.send_keys(msg)
      button = driver.find_element_by_class_name('_1U1xa')[0]
      button.click()
  </code></pre>
  <p>guys please someone good at python answer me !!!</p>