PowerShell In GUI Blog

PowerShell GUI Box Just In A Few Clicks

Posts Tagged ‘Metro testing

Metro automation: getting started

leave a comment »

After a long hiatus, yesterday, I suddenly thought that it’s the time to return to Metro automation. To my surprise, rumors have been already circulating that Windows 8 Next Preview is upcoming in hours. Intuition? Maybe. In time is in time.

Yesterday I added to UIAutomaitonSpy the functionality to run PowerShell scripts. Today I polished a bit (here is great volume of work to do).

Let’s start. I tested the following on Windows 8 CP x64 and Windows 8 RP x86 (Release Preview of June, 01st). The binaries was built on a Windows 8 CP x64 box.ImageC

1. download the package. It’s not the default release now.

2. Unpack the package to a certain directory. We need to put in a secure location. One of them is %SystemRoot%, the other is %ProgramFiles%. The latter is more appropriate. In my tests, I creates the “C:\Program Files\1” directory and put the binaries there. You have in the folder UIAutomationSpy.exe, the config, UIAutomation.dll and TMX.dll.


3. One more file you’ve got is a certificate. You need to install it. Alternatively, you can sign UIAutomationSpy.exe with the certificate you possibly have.

Otherwise, below are screenshots. Run certmgr, for example, from cmd.exe and follow the pictures:








After you installed the certificate and the application in the secure location (you might set the policy not to require this if you’d like to), you can run the application.

For the first test, just run the application, agree with UAC and manually run the Start screen by pressing the Win button. Now you should see something like on the picture below:


On the picture, UIAutomationSpy shows the code for the Mail tile. It is bordered with the red rectangle. All that I’d like to offer is to explore tiles:


This is a text box, Edit in terms of UIAutomation.

Tomorrow I’m planning to start discussing how to write and run scripts for Metro UI.



Written by Alexander Petrovskiy

June 1, 2012 at 10:05 pm

Posted in Powershell

Tagged with , ,