Getting Windows Inside Nested Panes

Aug 12, 2008 at 9:44 PM
I've really liked what White can do and how it simplifies programming .NET automation.  The application I am currently working with is a native .NET application that has nested panes for the different Windows inside the main window. 

I am having difficulty trying to access the nested panes and or controls.  There must be something hat I am missing, and any help would eb greatly appreciated. 

I am able to connect to the main application window.

The code below is what I have so far as well as the stack trace for the error I am seeing:


//Launch application
application =

SearchCriteria searchCriteria = SearchCriteria.ByAutomationId("ApplicationForm");
//Get Main Window
window = application.GetWindow(searchCriteria,
//Maximize Window
window.DisplayState = DisplayState.Maximized;

SearchCriteria navPanelSearch = SearchCriteria.ByAutomationId("Launcher");
Window launcher = application.GetWindow(navPanelSearch, InitializeOption.NoCache);

Error Message:
Test method Testing.QA.RegressionTests.Contracts.QATradingPhysicalPurchaseWhite.CreatePhysicalPurchaseDealWhite threw exception:  Core.UIItems.UIActionException: Couldn't find window with SearchCriteria AutomationId=NavigationPanel in process 4696, after waiting for 15000 ms

Stack Trace:
b__1() in C:\Dev\White\Core\Factory\WindowFactory.cs: line 37
Bricks.Core.Clock.Perform(Do do, Matched matched, Expired expired) in D:\bricks\Bricks\Core\Clock.cs: line 44
Core.Factory.WindowFactory.WaitTillFound(Do find, String message) in C:\Dev\White\Core\Factory\WindowFactory.cs: line 38
Core.Factory.WindowFactory.CreateWindow(SearchCriteria searchCriteria, Process process, InitializeOption option, WindowSession windowSession) in C:\Dev\White\Core\Factory\WindowFactory.cs: line 108
Core.Application.GetWindow(SearchCriteria searchCriteria, InitializeOption initializeOption) in C:\Dev\White\Core\Application.cs: line 151
Testing.QA.RegressionTests.Contracts.QATradingPhysicalPurchaseWhite.CreatePhysicalPurchaseDealWhite() in C:\DotNetProject\RightAngle.NET\Maint\S10.03\DotNet\Testing.QA\RegressionTests\Contracts\QATradingPhysicalPurchaseWhite.cs: line 112

Let know if you need more information, and thanks in advance for any help.


Aug 14, 2008 at 6:41 PM
Well, I resolved the problem.  I realized that the Panes were essentially containers for the ControlTypes I was trying to access.  By directly setitng those ControlTypes I was able to access the UIItems within the GUI successfully. 
Jun 5, 2013 at 1:40 AM

I'm having a similar type issue but my C# skills are not that great. so I was wondering if you could post a sample code how to use control types.

Thanks for your help