title: Is there a way to click on button in application using powershell
body: <p>using powershell code i would like to open the application and click on any option. like open Notepad++  and click on file -->new</p>
  
  <p>This is independent script which run in powershell console</p>
  
  <p>i tried to grab the Notepad++ window handle like this </p>
  
  <pre><code>$WindowHandle = Get-Process | Where-Object { $_.MainWindowTitle -Match $WindowTitle } | Select-Object -ExpandProperty MainWindowHandle
  </code></pre>
  
  <p>but i am not able to click on it.</p>
  
  <p>to open Notepad++</p>
  
  <pre><code>start-process "C:\Program Files\Notepad++\notepad++.exe"
  </code></pre>
  
  <p>to grab the window </p>
  
  <pre><code> $WindowHandle = Get-Process | Where-Object { $_.MainWindowTitle -Match $WindowTitle } | Select-Object -ExpandProperty MainWindowHandle
  </code></pre>
  
  <p>any code snippet which can help me in grabbing the control on notepad++ and click on options or buttons.</p>