ANUNAYA THAKUR
ANUNAYA THAKUR
Why are you creating two sessions? _appSessionWindowsDriver = new WindowsDriver(new Uri(AppiumDriverURI), appSessionAppiumOptions); Assert.IsNotNull(_appSessionWindowsDriver); Assert.IsNotNull(_appSessionWindowsDriver.SessionId); _appSessionWindowsDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); AppiumOptions desktopSessionAppiumOptions = new AppiumOptions(); desktopSessionAppiumOptions.AddAdditionalCapability("app", "Root"); desktopSessionAppiumOptions.AddAdditionalCapability("deviceName", DeviceName); _desktopSessionWindowsDriver = new WindowsDriver(new...
Does you application require interactions with other opened apps? Because the above link that you shared it uses the desktop session to interact with other apps.
> No, it does not. Then why do you require two sessions.
the error says: OpenQA.Selenium.WebDriverException HResult=0x80131500 Message=Object reference not set to an instance of an object. Source=WebDriver StackTrace: at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) at OpenQA.Selenium.Appium.AppiumDriver`1.Execute(String driverCommandToExecute, Dictionary`2 parameters)...
if you need any support send a teams invite.
What is shown in inspect.exe?
You can use automation id 30100.
If the UI is static then you can click by index, if not then ask the application developer to implement automation properties.
check [Selenium Grid](https://github.com/microsoft/WinAppDriver/blob/master/Docs/SeleniumGrid.md)
Have you tried printing the stack trace?