Hi,
I'm learning the White UI automation framework. Windows 7 32-bit SP1, White v 0.2.1. The victim is well known notepad.exe..
The scenario is very simple:
1. find notepad's main window
2. find a multi-line edit box
===>
I cannot perform this action using White automation framework for some reasons..
Please look at the code snipped below..
string exeName = "notepad";
Process[] processes = Process.GetProcessesByName(exeName);
Application app = processes.Length == 0 ? Application.Launch(exeName) : Application.Attach(exeName);
Window window = app.GetWindow(SearchCriteria.ByNativeProperty(AutomationElement.ClassNameProperty, "Notepad"), InitializeOption.NoCache);
window.Focus();
Thread.Sleep(1000);
var edit = window.Get<MultilineTextBox>(SearchCriteria.ByAutomationId("15"));
var edit = window.Get<TextBox>(SearchCriteria.ByAutomationId("15"));
AutomationElement edit = window.GetElement(SearchCriteria.ByAutomationId("15"));
AutomationElement aeEdit= window.AutomationElement.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.AutomationIdProperty, "15"));
Any ideas? I would like to use White, I have even implemented rather difficult scenario on MFC application, and almost decided to use White, but after that.. get stuck on NOTEPAD.EXE..
Thanks,
Aleksey