I am using Win App Driver to automate WPF application, Our WPF application is click once application. When I launch the application I noticed driver is null.
private string notepadAppid =
@"https://saqa.xyz.biz/abcnew/testets.Shell.Applications";
protected static OpenQA.Selenium.Appium.Windows.WindowsDriver<WindowsElement> driver;
Uri urls = new Uri("http://127.0.0.1:4723");
AppiumOptions opt = new AppiumOptions();
opt.AddAdditionalCapability("app", notepadAppid);
opt.AddAdditionalCapability("deviceName", "WindowsPC");
driver = new WindowsDriver<WindowsElement> (new Uri("http://127.0.0.1:4723"), opt,
TimeSpan.FromMinutes(1));
I noticed 'driver' is null, I am getting exception: "Failed to locate opened application window with appId: https://saqa.xyz.biz/abcnew/testets.Shell.Applications, and processId: -1. Thanks you in advance.
As mentioned here, you need to check the driver is null.