Reputation: 1
I have one problem for each UI test on my computer:Test method threw exception: Couldn't find window with title Calculator. Of course, window is present and its name is "Calculator"(checked by inspect). The same situation is for others UI elements.
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TestStack.White;
using TestStack.White.Factory;
using TestStack.White.UIItems;
namespace UnitTestProject3
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
using (var application = Application.Launch("Calc.exe"))
{
var calculator = application.GetWindow("Calculator", InitializeOption.NoCache);
// do something with the application
var b7 = calculator.Get<Button>(TestStack.White.UIItems.Finders.SearchCriteria.ByText("7"));
b7.Click();
application.Close();
}
}
}
}
What could it be?
Thanks in advance for your help.
Upvotes: 0
Views: 230