PowerShell In GUI Blog

PowerShell GUI Box Just In A Few Clicks

Posts Tagged ‘UIAutomation

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:

Image

Image

Image

Image

Image

Image

Image

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:

Image

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:

Image

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.

 

 

Advertisements

Written by Alexander Petrovskiy

June 1, 2012 at 10:05 pm

Posted in Powershell

Tagged with , ,

The UIAutomation module is out

leave a comment »

The blog that specializes in software testing using PowerShell has published an announcement about the release of a new module, the UIAutomation module.

Along with the WASP module, this one is the only native PowerShell tool for testing. Tools like white, watir or MS TestAPi are not very easy to implement in your PowerShell scripts. At least, you need to create wrappers, what is the additional and not ever needed work.

Instead, native PowerShell modules are intended to be used within script, fully support pipelining (not interchangeble with each other so) and make life of PowerShell warrior a bit easier.

I happened to be one of a small team of early adopters of the UIAutomation module, and need to say that the module works almost well (and definitely the thing that is good for its $0).

The download link: http://uiautomation.codeplex.com/releases/view/82076#DownloadId=340717

Written by Alexander Petrovskiy

February 12, 2012 at 11:03 am