title: Powershell script to automate button click
body: <p>Through powershell we need to auto search a site and click on it. That is after accessing the site and then in search box we entered the word for eg: "Linux" to search and then we need to press a button. While inspecting the button its showing as follows:</p>
  
  <pre><code>&lt;button class="ico-search" onclick="frmSiteSearch_conductSearch(); return false;"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>Script Iam trying are as follows but in search box its getting the correct word but button is not clicking.</p>
  
  <pre><code>$searchword = "linux" 
  $ie = New-Object -com InternetExplorer.Application 
  $ie.visible=$true
  $ie.navigate("search.geo.com") 
  while($ie.ReadyState -ne 4) {start-sleep -m 100} 
  $ie.document.getElementById("frmSiteSearch").value= "$searchword" 
  start-sleep 5
  $ie.document.getElementById("ico-search").Click()
  </code></pre>
  
  <p>Through powershell can anyone please help me on this.</p>