title: Scraping on Amazon Now Prime postcode entry
body: <p>I am trying to enter a postcode on primenow.amazon.co.uk and find if what delivery services they offer. I have made some progress with the script. Can anyone help me move it to the finish? </p>
  
  <p>The part i'm struggling with is: </p>
  
  <pre><code>'assigning the input variables to the html elements of the form
  ie.Document.getElementsByClassName("prime-now-input clearfix")(0).innerHTML = Postcode
  
  'click
  ie.Document.getElementsByClassName("pull-right")(0).click
  </code></pre>
  
  <p>Doesn't seem to work fully. Any other methods?</p>
  
  <p>Full code:</p>
  
  <pre><code>Sub PostCode_Delivery()
  
  Dim ie As Object
  Dim ws As Excel.Worksheet
  Dim i As Long
  
  Set ie = CreateObject("InternetExplorer.Application")
  Set ws = ThisWorkbook.Worksheets("Postcodes")
  i = 1
  
  Do While ws.Cells(i, 1).Value &lt;&gt; ""
  
  With ie
      .Visible = True
      .Navigate ("primenow.amazon.co.uk")
  
  'we ensure that the web page downloads completely before we fill the form automatically
  While ie.ReadyState &lt;&gt; 4
     DoEvents
  Wend
  
  Postcode = ws.Cells(i, 1).Value
  
  'assigning the vinput variables to the html elements of the form
  ie.Document.getElementsByClassName("prime-now-input clearfix")(0).innerHTML = Postcode
  
  'click
  ie.Document.getElementsByClassName("pull-right")(0).click
  
  'again ensuring that the web page loads completely before we start scraping data
  Do While ie.Busy: DoEvents: Loop
  
  Set OutputResult = ie.Document.getElementsByClassName("availability__form__instructions__heading")(0).Value
  
  ws.Cells(i, 2).Value = OutputResult(0).textContent
  
  Application.StatusBar = "Number: " &amp; i
  i = i + 1
  End With
  Loop
  
  ie.Quit
  
  'cleaning up memory
  Set ie = Nothing
  
  End Sub
  </code></pre>