Skip to content

Instantly share code, notes, and snippets.

@vquaiato
Created April 6, 2011 20:31
Show Gist options
  • Select an option

  • Save vquaiato/906462 to your computer and use it in GitHub Desktop.

Select an option

Save vquaiato/906462 to your computer and use it in GitHub Desktop.
Teste de interface com TestApi
[Test]
public void toolbox_com_1_item_gera_toolboxwindow_com_1_botao()
{
string sampleAppPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase), "Dashboard.exe");
AutomatedApplication a = new OutOfProcessApplication(new OutOfProcessApplicationSettings
{
ProcessStartInfo = new ProcessStartInfo(sampleAppPath),
ApplicationImplementationFactory = new UIAutomationOutOfProcessApplicationFactory()
});
a.Start();
a.WaitForMainWindow(TimeSpan.FromSeconds(10));
var mainWindow = a.MainWindow as AutomationElement;
AutomationElement inputTextBox = AutomationUtilities.FindElementsById(mainWindow, "someInput")[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment