title: Excel Automate Edge with CDP Protocol - Error to Get Class Name
body: <p>I am new to VBA Excel, but I would like to be able to create a macro to automate Edge to retrieve information on a specific page.</p>
  <p>The goal is to know if the ClassName &quot;colHead w3&quot; appears or not on the page in question, I put the link of the HTML file so that you can know the location of this class (internal link inaccessible elsewhere, I have not find another way to post it).</p>
  <p>I use the .QuerySelector , .GetElementsByClassName and .GetElementsByCss</p>
  <p>But either I receive the error message &quot;Error 424: Object required&quot; or the error passes and shows me the incorrect result.</p>
  <p>This is the code i use for test :</p>
  <pre class="lang-vb prettyprint-override"><code>Sub runedge()
  
      'Start Browser
      Dim objBrowser As clsBrowser
      Dim ws As Worksheet
      Dim LastRow As Long
      Dim Class As Object
      Dim pst As Long
      Set objBrowser = New clsBrowser
      objBrowser.start &quot;edge&quot;
      
  Set ws = ThisWorkbook.Sheets(&quot;Feuil1&quot;)
  
  With ws
  LastRow = ws.Range(&quot;A&quot; &amp; .Rows.Count).End(xlUp).row
  
          For i = 2 To LastRow
  
      'navigate
      Call objBrowser.navigate(&quot;link&quot;)
      
      objBrowser.wait till:=&quot;interactive&quot;
  
  
      'Call objBrowser.jsEval(&quot;document.getElementsByName(&quot;&quot;value&quot;&quot;)[0].value=&quot;&quot;test&quot;&quot;&quot;)
  
  
      'run search
      'Call objBrowser.jsEval(&quot;document.getElementsByName(&quot;&quot;search&quot;&quot;)[0].click()&quot;)
      
      'wait till search has finished
      'objBrowser.wait till:=&quot;interactive&quot;
  
  On Error GoTo 0
   
      objBrowser.wait till:=&quot;interactive&quot;
  
  pst = ws.Cells(Rows.Count, &quot;D&quot;).End(xlUp).row + 1
  
      If objBrowser.jsEval(&quot;Document.queryselector(&quot;&quot;.colHead.w3&quot;&quot;)[0]&quot;) &gt; 0 Then
          ws.Cells(pst, &quot;D&quot;).Value = &quot;Redeemed&quot;
      Else
          ws.Cells(pst, &quot;D&quot;).Value = &quot;Free&quot;
      End If
  
  
  Next
  End With
  
  objBrowser.show
  
  End Sub
  </code></pre>
  <p>HTML File Link : <a href="https://www.mediafire.com/file/aa7m16xyrmvrmvt/SearchResults.do.html/file" rel="nofollow noreferrer">https://www.mediafire.com/file/aa7m16xyrmvrmvt/SearchResults.do.html/file</a></p>
  <p>Thank you for help :)</p>