Dozer789
Dozer789

Reputation: 2036

What is the assembly reference for accessing another application?

I am trying to access another program that is running, and I found this code:

Application application = Application.Launch("foo.exe");
Window window = application.GetWindow("bar", InitializeOption.NoCache);

Button button = window.Get<Button>("save");
button.Click();

But when I try to run it, it says:

The type or namespace name "Window" could not be found (are you missing a using directive or an assembly reference?)

I am wondering if anyone knows the using reference?

Thanks.

Upvotes: 0

Views: 542

Answers (1)

Wiktor Zychla
Wiktor Zychla

Reputation: 48230

This code uses the TestStack.White framework. The easiest way to get is is to reference the nuget package.

https://github.com/TestStack/White

http://www.nuget.org/packages/TestStack.White/

Upvotes: 2

Related Questions