Problem to playback WpfControls

Feb 27, 2014 at 11:46 AM
Edited Feb 27, 2014 at 12:20 PM
we already have a lot of quite complicated UIMaps and we already implemented UIControl wrappers that keep most of the actions and asserts that otherwise are recorded in the UIMaps. The idea of CUITe seams to be a very reasonable step further.
I tried to integrate some CUITe controls in existing CodedUITest classes and used the WpfSample to get the pattern. I managed to playback my main window (check existence, SetFocus), but I can't playback controls within the main window. Although they all have automation ids the playback throws an exception UITestControlNotFoundException (The playback failed to find the control with the given search properties).
Any idea what might be wrong? What about playback settings? Are there any limits to the depth of control hierarchy? Is it a problem to instantiate UIMaps in parallel?
What is the theory - is it possible to find any control by automationId only?

Mar 7, 2014 at 7:10 AM
Hi Hans-Peter,

Yes, if the automation id is unique for the current view within your application, interacting with the control can be automated.

What is the complete error message with stack trace?

You can try to enable verbose logging and the log file will contain more information about the issue.

Enabling Tracing and HtmlLogger in Coded UI Test
  1. Open App.config file in the project
  2. Add following entry under configuration node
    <add name="EqtTraceLevel" value="4" />
How To: Enable Tracing for “UI Test” Components
For UI Test, the trace file is generated in %temp%\UITestLogs*\LastRun\UITestLog.html where * could be empty for VS or could be exe name like CodedUITestBuilder for other cases. The LastRun here indicates that this is THE file for last run – the earlier ones would be stored as PreviousRunXX. The tool automatically cleans up old trace file if it exceeds ‘n’ (today it is 25) previous runs.
Guidelines on improving performance of Coded UI Test playback
By default, the playback searches within the entire sub-tree of the container specified.