title: How to click links on a webpage in visual basic
body: <p>I have searched for how to click links on a webpage in vb before, and got a good answer on this site actually.  But now I am trying to click another link, and let me just post it's code so it's easier to understand.  (First time ever asking a question, so go easy on me lol)</p>
  
  <pre><code>&lt;div class="pauseButton" style="display: block;"&gt;&lt;a href="#" address="true"&gt;&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Here is my code (This is for Pandora btw, and here is my code for it to sign you in.)</p>
  
  <pre><code>Public Class fMain
  
  Dim elementCollection As HtmlElementCollection
  
  Private Sub fMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      wb.Navigate("http://www.pandora.com")
  End Sub
  
  'buttons
  
  Private Sub bLogin_Click(sender As Object, e As EventArgs) Handles bLogin.Click
      elementCollection = wb.Document.GetElementsByTagName("input")
  
      For Each ele As HtmlElement In elementCollection
          If ele.GetAttribute("name").Equals("email") Then
              ele.SetAttribute("Value", tbEmail.Text)
          End If
  
          If ele.GetAttribute("name").Equals("password") Then
              ele.SetAttribute("Value", tbPassword.Text)
          End If
  
          If ele.GetAttribute("type") = "submit" Then
              ele.InvokeMember("click")
          End If
      Next
  End Sub
  
  Private Sub bSignOut_Click(sender As Object, e As EventArgs) Handles bSignOut.Click
  
  End Sub
  
  Private Sub bPlay_Click(sender As Object, e As EventArgs) Handles bPlay.Click
      Dim IsRightElement As Boolean = False
  
      For Each ele As HtmlElement In wb.Document.Links
          If IsRightElement Then
              ele.InvokeMember("click")
              IsRightElement = False
              Exit For
          End If
  
          If ele.GetAttribute("class") = "playButton" Then
              IsRightElement = True
          End If
      Next
  End Sub
  
  Private Sub bPause_Click(sender As Object, e As EventArgs) Handles bPause.Click
  
  End Sub
  
  Private Sub bFavorite_Click(sender As Object, e As EventArgs) Handles bFavorite.Click
  
  End Sub
  End Class
  </code></pre>
  
  <p>Any help would be greatly appreciated, and sorry if I made the question confusing, but pretty much I know how to click a link with specific href="link.com" but here, the only thing distinguishing the play button with any other button is its   the href="#" so that is not much help.  Again thanks in advanced.  (:</p>
  
  <p>EDIT:  I am trying to make a Pandora streamer, I should have mentioned that earlier.</p>