Hello, I've just started using powershell. I have written an automation script that works perfectly with the exception on one step.
I’m creating a batch of records in an in-house web application with my script. Using internet explorer I’m entering data in fields and clicking the next button to advance. On one page there is date that needs filled in but it is validated by some client side JavaScript; which is invoked when the "next" button is clicked. The problem is when I call the .click() method through powershell the JavaScript is not invoked. When you manually click on it with the mouse pointer it works fine. I've done a lot of testing and I think the easiest way to get around is to move the mouse pointer to the position of the button with:
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point(613,664)
then invoke a click event with the mouse pointer. But I can’t find any documentation on how to create a click event.
Thanks!!