J'essaie d'automatiser une application en utilisant TestStack/White API (qui est basé sur la bibliothèque UI Automation de Microsoft).TestStack/White API
Le problème est le suivant:
À un certain moment de l'automatisation, je dois faire face à une fenêtre « Dialogue », qui semble être un processus distinct, si je regarde « Gestionnaire des tâches Windows ". Mais peu importe comment j'essaie d'accéder à la "fenêtre de dialogue" (classe, ID, texte, ControlType, etc.) je ne suis pas en mesure d'y accéder.
Vous pouvez trouver l'image UISpy et le code ci-dessous ...
Using UISpy - Dialog Information
using (var DISCLAIMER_App = Application.Attach(@"PathToExecutable"))
using (var DISCLAIMER_Window = DISCLAIMER_App.GetWindow(SearchCriteria.ByClassName("#32770"), InitializeOption.NoCache))
{
var IAccept_button = DISCLAIMER_Window.Get<Button>(SearchCriteria.ByText("I accept"));
IAccept_button.Click();
}
# I've tried also Application.Launch, Application.AttachOrLaunch.
# I also looked to be sure that the Dialog window is a separated process and doesn't belong to any parent window.
Toutes les suggestions?