One of goals in my new approach to my job is to speed up our Quality Control (QC) processes. We use an internal website for a lot of our QC checks. This website requires manual selection of each job to be checked. It would help if we could feed a list of jobs to be QCed to a script that would automate the selection of each job.
There are a number of well-known tools to do this kind of browser automation, many of them free. However, since our QC website works about as well in Internet Explorer as any other browser, I think my best approach will be to do COM automation from PowerShell, since all the parts of the solution are built in to Windows.
Accordingly, I’ve started searching for reference material on the web:
- Use PowerShell to Check In for Flight (via Microsoft’s “Hey, Scripting Guy!” blog)
- Using IE Automation in PowerShell to Simplify Browser-Based Tasks
- Automating Internet Explorer with PowerShell
(uses “while ($ie.Busy –eq $true) { Start-Sleep –Seconds 1; }” to wait until the browser is ready) - IE Automation with Powershell (StackOverflow thread)
(uses “while($ie.ReadyState –ne 4) {start–sleep 1}” to wait until browser is ready –
I think the “$ie.Busy -eq $true” method is more intuitive, though) - Automating Internet Explorer using PowerShell and resetting Alternate CSS URL –
this is a nice article – the author breaks the script down into functions, and includes a function to execute jQuery and other JavaScript from the PowerShell script.