Border around Automation Elements

Aug 7, 2012 at 4:44 PM

Hello.

I have noticed that the automation elements that are selected have a magenta border around them (or at least this is how it appears on my monitor).

Is this something implemented in the Powershell extension, or does it come from the UI Automation API itself? Any way to remove it?

Thanks.

Coordinator
Aug 7, 2012 at 6:53 PM
Edited Aug 9, 2012 at 11:12 PM

Hello JohnQuest,

the square can be removed by running the following command:

[UIAutomation.Preferences]::Highlight = $false;

The latest version also supports highlighting of the parent element:

[UIAutomation.Preferences]::HighlightParent = $false;

By default, the module works in the Presentation mode, because of the first actions the tester does are trying the code and observing the results. For unattended runs, there is the Normal mode. The command to switch the module to the Normal mode is:

[UIAutomation.Mode]::Profile = [UIAutomation.Modes]::Normal;

The Normal mode works without highlighting and debug delays.

Aug 7, 2012 at 8:01 PM

Excellent.

Thank you.