UIAutomation 0.8.6 Betas

Rating: No reviews yet
Downloads: 491
Released: Apr 5, 2013
Updated: Nov 22, 2013 by apetrovskiy
Dev status: Beta Help Icon

Recommended Download

Application UIAutomation 0.8.6 Beta 5 .NET35
application, 2246K, uploaded Sep 21, 2013 - 242 downloads

Other Available Downloads

Application UIAutomation 0.8.6 Beta 1 .NET35
application, 222K, uploaded Feb 22, 2013 - 8 downloads
Application UIAutomation 0.8.6 Beta 1 .NET40
application, 214K, uploaded Feb 22, 2013 - 22 downloads
Application UIAutomation 0.8.6 Beta 1 for Metro UI testing
application, 590K, uploaded Feb 22, 2013 - 11 downloads
Application UIAutomation 0.8.6 Beta 2 .NET35
application, 224K, uploaded Feb 25, 2013 - 6 downloads
Application UIAutomation 0.8.6 Beta 2 .NET40
application, 216K, uploaded Feb 25, 2013 - 8 downloads
Application UIAutomation 0.8.6 Beta 2 for Metro UI testing
application, 592K, uploaded Feb 25, 2013 - 7 downloads
Source Code UIAutomation 0.8.6 Beta 2 sources
source code, 508K, uploaded Feb 25, 2013 - 11 downloads
Example UIAutomation 0.8.6 Beta 2 samples
example, 43K, uploaded Feb 25, 2013 - 18 downloads
Application UIAutomation 0.8.6 Beta 3 .NET35
application, 226K, uploaded Mar 12, 2013 - 5 downloads
Application UIAutomation 0.8.6 Beta 3 .NET40
application, 218K, uploaded Mar 12, 2013 - 5 downloads
Application UIAutomation 0.8.6 Beta 3 for Metro UI testing
application, 593K, uploaded Mar 12, 2013 - 5 downloads
Source Code UIAutomation 0.8.6 Beta 3 sources
source code, 686K, uploaded Mar 12, 2013 - 5 downloads
Example UIAutomation 0.8.6 Beta 3 samples
example, 45K, uploaded Mar 12, 2013 - 6 downloads
Application UIAutomation 0.8.6 Beta 4 .NET35
application, 236K, uploaded Mar 28, 2013 - 33 downloads
Application UIAutomation 0.8.6 Beta 4 .NET40
application, 229K, uploaded Mar 28, 2013 - 9 downloads
Application UIAutomation 0.8.6 Beta 4 for Metro UI testing
application, 604K, uploaded Mar 28, 2013 - 11 downloads
Source Code UIAutomation 0.8.6 Beta 4 sources
source code, 723K, uploaded Mar 28, 2013 - 9 downloads
Example UIAutomation 0.8.6 Beta 4 samples
example, 55K, uploaded Mar 28, 2013 - 10 downloads
Application UIAutomation 0.8.6 Beta 5 .NET40
application, 2239K, uploaded Sep 21, 2013 - 29 downloads
Application UIAutomation 0.8.6 Beta 5 for Modern UI testing
application, 2634K, uploaded Sep 21, 2013 - 10 downloads
Source Code UIAutomation 0.8.6 Beta 5 sources
source code, 792K, uploaded Sep 21, 2013 - 7 downloads
Example UIAutomation 0.8.6 Beta 5 samples
example, 61K, uploaded Sep 21, 2013 - 14 downloads

Release Notes

Beta 1:
added:
  • the Get-UIAWindow cmdlet now supports -AutomaitonId and -Class parameters (with or without the -Name parameter)
Start-Process calc;
sleep -Milliseconds 500;
Get-UIAWindow -Class Console* | Read-UIAControlName;
Get-UIAWindow -Class *frame* | Read-UIAControlName;
  • the -Recurse parameter to the Get-UIAWindowcmdlet
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAMenuItem -Name help | Invoke-UIAMenuItemExpand | Get-UIAMenuItem -Name *about* | Invoke-UIAMenuItemClick;
Get-UIAWindow -pn calc -Recurse | Read-UIAControlName;
Get-UIAWindow -n *about* -Recurse | Read-UIAControlName;
broken:
  • the -SearchCriteria cmdlet in Get-UIAWindow_Class.ps1ControlType cmdlets could not be used (temporarily) with the -Name parameter

Beta 2:
added:
  • the Set-UIA[ControlType]ToggleState cmdlet
Set-UIACheckBoxToggleState $true;
Set-UIACheckBoxToggleState $false;
changed:
  • the -Recurse parameter in the Get-UIAWindow cmdlet is set $false by default for code compatibility. In new code allowed it is set $true by default:
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAMenuItem help | Invoke-UIAMenuItemExpand | Get-UIAMenuItem -n *about* | Invoke-UIAMenuItemClick;
# -Recurse = $false, though you can set it $true
Get-UIAWindow -pn calc;
Get-UIAWindow -pid (Get-Process calc).Id;
Get-UIAWindow -InputObject (Get-Process calc);
# -Recurse = $true
Get-UIAWindow -pn calc -Name *about*; # one window
Get-UIAWindow -pn calc -Name *calc*; # two windows
# earlier, we needed to issue somethink like:
Get-UIAWindow -pn calc | Get-UIAChildWindow -Name *about*; # one window
  • the Invoke-UIA[ControlType]Toggle cmdlets are now obsolete
Note: I rewrote my release script yesterday and sources in Beta 2 might be partially wrong, at least without output folders. I'll fix and re-check this script in Beta 3.

Beta 3:
added:
  • the Wait-UIAWindow cmdlet. This cmdlet works exactly as the Get-UIAWindow cmdlet (in fact, inherits from) with the only difference: the Test cmdlet returns $true/$false instead of AutomationElement/Exception
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAMenuItem help | Invoke-UIAMenuItemExpand | Get-UIAMenuItem -n *about* | Invoke-UIAMenuItemClick;
Start-Process calc -PassThru;

# by process name
# $true
Wait-UIAWindow -pn calc;
# $true
Wait-UIAWindow -pn calc -n *about*;
# $true
Wait-UIAWindow -pn calc -c *32770*;
# $true
Wait-UIAWindow -pn calc -c *frame*;
# $false
Wait-UIAWindow -pn calc -c *aaa*;

# by process object
# $true
Wait-UIAWindow -InputObject (Get-Process calc);

# by process Id
# $true
Wait-UIAWindow -pid (Get-Process calc).Id;
# $true
Wait-UIAWindow -pid (Get-Process calc).Id -n *calc*;
# $true
Wait-UIAWindow -pid (Get-Process calc).Id -n *about*;
# $false
Wait-UIAWindow -pid (Get-Process calc).Id -n *asdf*;

# by window title (name)
# $false (there is no recursive sarch by default)
Wait-UIAWindow -n *about*
# $true
Wait-UIAWindow -n *about* -Recurse
  • the Get-UIAWindow cmdlet (and the Wait-UIAWindow cmdlet as well) supports -AutomationId and -Class parameters in recurse search:
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAMenuItem help | Invoke-UIAMenuItemExpand | Get-UIAMenuItem -n *about* | Invoke-UIAMenuItemClick;

# the good old way to get a window by process name
Get-UIAWindow -pn calc;

# all windows the process exposes
Get-UIAWindow -pn calc -Recurse;

# the About Calculator window
Get-UIAWindow -pn calc -Name *about*;

# both windows, "Calculator" and "AboutCalculator"
Get-UIAWindow -pn calc -Name *calc*;

# the main window (ClassName -eq 'CalcFrame')
Get-UIAWindow -pn calc -Class *frame*;

# the About window (ClassName -eq '#32770')
Get-UIAWindow -pn calc -Class *327* | Read-UIAControlClass;
Get-UIAWindow -pn calc -Class "#32770";
  • the Get-UIAWindow and Wait-UIAWindow cmdlets now support search for a window or windows only if a certain control or control are on it/them.
It's especially useful (along with other ways to use this) for testing of wizards. For example, a typical setup. After you pressed the Install button, it shows one or more pages. You need to catch the last page, "Complete", for example.
If you use the folllowing code, you'll get an error:
Get-UIAWindow -n *wizard*title* -Seconds 120 | Wait-UIAControlState -SearchCriteria @{controlType="text";name="*complete*"} -Seconds 300;
By the time the last page appeared, you window is gone (every page is a window with its own handle).
Now, the window will be returned only after a control of interest is gotten:
Get-UIAWindow -n *wizard*title* -WithControl @{controlType="text";name="*complete*"} -Seconds 480;
Another sample is the following (we perform it with hands):
# start calc.exe and ensure that it's in the Standard mode
# run code:
Get-UIAWindow -pn calc -Seconds 60 -WithControl @{controltype="button";name="clear*all*"}
# change mode to Statistics: menu item View -> Statistics
# the Get-UIAWindow cmdlet immediately returns the window. The CAD button is the button that has name "Clear all..."
bug fix:
  • Invoke-UIAControlContextMenu on Windows 8 (added WM_MOUSEMOVE after MOUSEDOWN and before MOUSEUP)
  • right click and double click (the same fix)
Now, this works well:
# serivces.msc, run powershell as administrator
# open the Connect... window via right click on the tree item
Get-UIAWindow -n services | Get-UIATreeItem | Invoke-UIAControlContextMenu | Get-UIAMenuItem -n connect* | Invoke-UIAMenuItemClick;
# double click on a service in the grid:
Get-UIAWindow -n services | Get-UIADataGrid | Get-UIADataItem BranchCache | Invoke-UIAControlClick -DoubleClick;

Beta 4:
added:
  • Show-UIABanner, Hide-UIABanner, Add-UIABAnnerText and the -Banner parameter to the most of cmdlets (the STA mode is highly recommended, i.e. powershell.exe -sta)
Show-UIABanner "We are testing now the availability of button 10"
Start-Process calc -PassThru | Get-UIAWindow | Get-UIAButton 10
Hide-UIABanner
Start-Process calc -PassThru | Get-UIAWindow -Banner "Test of Calculator menu" | Get-UIAMenuItem view | Invoke-UIAMenuItemExpand | Get-UIAMenuItem Scientific | Invoke-UIAMenuItemClick;
  • renovated New-UIAWizard, Add-UIAWizardStep and Invoke-UIAWizard cmdlets
#visit the following link:
# https://github.com/apetrovskiy/STUPS/blob/master/samples/UIAutomation/Wizard/AddPrinterManually.ps1
Note: there is a known memory leak in the situation the Invoke-UIAWizard cmdlet got stuck with an unexpected window on the rightly caught current step.
Update: now, this issue is fixed. The fix will be available in the release version. As it is known now, the issue was not in Wizard cmdlets. Nonetheless, the version that is in 0.8.6 Beta 4 shipped with not implemented StopAction.

Reviews for this release

No reviews yet for this release.