Я пишу простой установочный скрипт с TestStack White, поэтому я могу узнать структуру (я не нашел много информации в Интернете).Управление окном, которое я не запустил
Я использую лиги легенды установить для этого маленького эксперимента
после того как я заполнения формы и нажатия кнопки Далее, есть окно, которое открывается из программы установки.
Я хочу знать, есть ли способ ПОЛУЧИТЬ окно, даже если я не тот, кто его выполняет.
это код, я использую для запуска приложения, вплоть до момента открытия нового окна:
private void pressXButton(White.Core.UIItems.WindowItems.Window currentWindow, string buttonName)
{
var xButton = currentWindow.Get<White.Core.UIItems.Button>(White.Core.UIItems.Finders.SearchCriteria.ByText(buttonName));
xButton.Click();
currentWindow.WaitWhileBusy();
}
public void RunScript()
{
White.Core.Application application = White.Core.Application.Launch(filePath);
White.Core.UIItems.WindowItems.Window window = application.GetWindow(windowTitle);
window.WaitWhileBusy();
pressXButton(window, NEXT_BUTTON_TEXT);
var radioButtonAgree = window.Get<White.Core.UIItems.RadioButton>(White.Core.UIItems.Finders.SearchCriteria.ByText("I accept the terms in the License Agreement"));
radioButtonAgree.Select();
window.WaitWhileBusy();
pressXButton(window, NEXT_BUTTON_TEXT);
pressXButton(window, NEXT_BUTTON_TEXT);
pressXButton(window, NEXT_BUTTON_TEXT);
pressXButton(window, NEXT_BUTTON_TEXT);
pressXButton(window, NEXT_BUTTON_TEXT);
pressXButton(window, "Install");
//afther pressing the Install Button the program ask to install Microsoft Visual C++ 2005 Redistributable Package and here is where im stcuk
}
(простите за мой английский)