title: VBA can you get elements by source (GetElementBySrc)
body: <p>In VBA, Is it possible to have a GetElementBySrc command?</p>
  
  <p>My macro is entering data into a webpage textbox and clicking search. </p>
  
  <p>I have a Do function that loops until Internet Explorer is in ready state but Internet Explorer hits a ready state before the search is complete/result page loads.</p>
  
  <p>There's an image "processing.gif" that appears on the search page while waiting for the results to show. I'm thinking I might have more luck if I can write an "If...Then" command that will wait until the image is no longer on the search page.</p>
  
  <p>The tag I'm trying to find will say</p>
  
  <pre><code>&lt;img alt="search" src"images/processing.gif" /&gt;
  </code></pre>
  
  <p><strong>ADDITIONAL THOUGHT</strong></p>
  
  <p>I was thinking about something like this.</p>
  
  <pre><code>Do
    If IE.Document.GetElementsByTagName("img").Attributes("src").Value = "images/processing.gif" Is Nothing Then
        Exit Do
    Else
        DoEvents
    End If
  Loop
  </code></pre>