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:
SearchCriteria searchCriteria =
//Get Main Window
window = application.GetWindow(searchCriteria, InitializeOption.NoCache);
window.DisplayState = DisplayState.Maximized;
SearchCriteria navPanelSearch =
Window launcher = application.GetWindow(navPanelSearch,
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
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.
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.
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