title: VBA: Open chat from html telegram website
body: <p>The objetive is to open the first telegram chat from the website: <a href="https://web.telegram.org/#/im" rel="nofollow noreferrer">https://web.telegram.org/#/im</a> and see the content. In my case would be "Telegram" chat as the image below.
  <a href="https://i.stack.imgur.com/I0Lp4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/I0Lp4.jpg" alt="Telegram image"></a></p>
  
  <p>I got this code from another question and tried to edit it for the need and it seems to perform the click but does not show the conversation.</p>
  
  <pre><code>Sub Telegram()
  
   'Open website
      Dim IE As New InternetExplorer
      IE.Visible = True
      IE.Navigate "https://web.telegram.org/"
      Do While IE.ReadyState &lt;&gt; READYSTATE_COMPLETE
      Loop
      'Wait till page charge
      Application.Wait (Now + TimeValue("0:00:03"))
  
      'Click on first telegram chat
      IE.document.getElementsByClassName("im_dialog_peer")(0).Click
  
  End Sub
  </code></pre>
  
  <p>HTML code according to inspect element:</p>
  
  <pre><code>&lt;div class="im_dialog_message_wrap"&gt;
  
      &lt;div class="im_dialog_peer"&gt;
        &lt;span my-peer-link="dialogMessage.peerID" verified="true"&gt;Telegram &lt;i class="icon-verified"&gt;&lt;/i&gt;&lt;/span&gt;
      &lt;/div&gt;
  
      &lt;div ng-switch="dialogMessage.typing ? 'typing' : (!dialogMessage.unreadCount &amp;amp;&amp;amp; dialogMessage.draft ? 'draft' : (dialogMessage.deleted ? 'deleted' : 'message'))"&gt;
  
        &lt;!----&gt;
  
        &lt;!----&gt;
  
        &lt;!----&gt;
  
        &lt;!----&gt;&lt;div ng-switch-when="message" class="im_dialog_message" style=""&gt;
          &lt;span ng-switch="dialogMessage.peerID &gt; 0 || dialogMessage.fromID &lt; 0"&gt;
            &lt;!----&gt;&lt;span ng-switch-when="true"&gt;
              &lt;!----&gt;
            &lt;/span&gt;&lt;!----&gt;
            &lt;!----&gt;
          &lt;/span&gt;
  
          &lt;span my-short-message="dialogMessage"&gt;&lt;!----&gt;&lt;!----&gt;&lt;!----&gt;&lt;span class="im_short_message_text" ng-if="message.message.length &amp;amp;&amp;amp; (!message.media || message.media._ == 'messageMediaWebPage')" ng-bind-html="message.richMessage"&gt;Angel:  Detectamos una conexión a tu cuenta desde un nuevo dispo&lt;/span&gt;&lt;!----&gt;&lt;/span&gt;
        &lt;/div&gt;&lt;!----&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  </code></pre>
  
  <p>Thanks in advance for your valuable help.</p>