title: I want to fill data with javascript in selenium vba
body: <p>I have a web form of pre populated data which i have to fill. I want to do this with javascript. I am not sure to write the code .</p>
  
  <pre><code>Public Sub ABC()
      Dim document As HTMLDocument
      Dim bot As New WebDriver
      Dim  cSCRIPT,m
      m=58
      bot.Start "chrome", ""
      bot.Get "https://XYZ"
    cSCRIPT = "document.getElementByXPath("//td[contains(text(),'XXXX')]/following-sibling::td[5]").value='" &amp; m &amp; "'"
   bot.ExecuteScript cSCRIPT
  </code></pre>
  
  <p>But my code do not work. How can I code in selenium VBA with the help of XPath to fill data in Web table.</p>