Error - Failed to locate opened application window with appId:
Hi there, I am getting an error when using Winappdriver to test my windows app. I am using Javescript. I am using a .bat file to launch my app. Because the nature of the app is to get added to the system tray when the .exe gets executed. I couldn't find a way to double click the app icon from the system tray. Hence using a .bat file.
Any help is much appreciated. i'm using (https://github.com/react-native-windows/selenium-webdriver-winappdriver-example) to help create my project.
Error : Failed to locate opened application window with appId:
My code,
import { driver, windowsAppDriverCapabilities } from 'selenium-appium'
const appId = 'D:\Users\kasun\Downloads\quality.bat'
class TestEnvironment { setup() { jest.setTimeout(60000); const capabilities = windowsAppDriverCapabilities(appId); return driver.startWithCapabilities(capabilities); } teardown() { return driver.quit(); } }
export default new TestEnvironment();
I guess it won't work. As you are giving the bat path instead of app path, try giving the exe path, though you can continue launching app using bat or process builder.
@khapuhetti try this thread - looks like the same issue.
You will need to start with initiating your session as Root type.
https://github.com/Microsoft/WinAppDriver/issues/313