title: How I can send a message on Facebook using Selenium Driver in Python
body: <p>I am trying to send a message to my FB friends using selenium in python. I've tried Element by Xpath, CSS Selector, Class but it doesn't work please help me how it would be I'm trying using </p>
  
  <pre><code>Message_button = browser.find_element_by_id("u_0_t")
  Message_button.click()
  time.sleep(10)
  
  message = browser.find_element_by_xpath("//textarea[@class='luiTextareaAutogrow _552m']")
  message.send_keys("Hi this is Mark how are you..!")
  message.submit()
  time.sleep(10)
  </code></pre>
  
  <p>Here is the FB Code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="fbNubFlyoutFooter"&gt;
    &lt;div class="_552h _n4k"&gt;
      &lt;textarea style="height: 15px;" class="uiTextareaAutogrow _552m" data-ft="{&amp;quot;tn&amp;quot;:&amp;quot;+N&amp;quot;}" onkeydown="run_with(this, [&amp;quot;legacy:control-textarea&amp;quot;], function() {TextAreaControl.getInstance(this)});"&gt;&lt;/textarea&gt;
    &lt;/div&gt;
    &lt;div style="right: 0px;" class="_552n"&gt;
      &lt;div class="_10nr"&gt;&lt;/div&gt;
      &lt;div class="_6a _552o"&gt;
        &lt;form action="https://upload.facebook.com/ajax/mercury/upload.php" class="_vzk" title="Add Photos" method="post" data-reactid=".12"&gt;
          &lt;input name="attach_id" data-reactid=".12.0" type="hidden"&gt;
          &lt;input name="images_only" value="true" data-reactid=".12.1" type="hidden"&gt;
          &lt;div class="_m _4q60 _3rzn _6a" data-reactid=".12.2"&gt;&lt;a tabindex="0" class="_4q61 _5f0v _509v" data-reactid=".12.2.0"&gt;&lt;i class="_509w" alt="Camera" data-reactid=".12.2.0.0"&gt;&lt;/i&gt;&lt;/a&gt;
            &lt;input class="_n" name="attachment[]" multiple="" accept="image/*" title="Add Photos" data-reactid=".12.2.1" type="file"&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;
      &lt;div class="uiToggle _1tn3 emoticonsPanel" data-ft="{&amp;quot;tn&amp;quot;:&amp;quot;+O&amp;quot;}"&gt;&lt;a class="_4vui" tabindex="0" title="Choose a sticker or emoticon" rel="toggle" role="button"&gt;&lt;i class="_4l9x"&gt;&lt;/i&gt;&lt;/a&gt;
        &lt;div class="_5r8f panelFlyout uiToggleFlyout"&gt;
          &lt;div class="_5r8p"&gt;
            &lt;div style="padding:30px;text-align:center;" data-reactid=".13"&gt;&lt;span class="img _55ym _55yq _55yo _5d9-" aria-label="Loading..." aria-busy="true" data-reactid=".13.0"&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="panelFlyoutArrow"&gt;&lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="lfloat"&gt;&lt;/div&gt;
      &lt;div class="_5g2o"&gt;&lt;a tabindex="0" aria-label="Send a Like" class="_3s0d" title="Send a Like" data-reactid=".10"&gt;&lt;i class="_2y9i _30yy" data-reactid=".10.0"&gt;&lt;/i&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please help me am I using the correct method </p>