WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

the windows application that needed to be test is running, but goes to error "org.openqa.selenium.WebDriverException: Failed to locate opened application window with appId"

Open doling0 opened this issue 4 years ago • 3 comments

the windows application that needed to be test is running, but goes to error "org.openqa.selenium.WebDriverException: Failed to locate opened application window with appId"

the same DesiredCapabilities when I test other applicaion is normal

        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("app",MY_APPID);
        capabilities.setCapability("platformName", "Windows");
        capabilities.setCapability("appWorkingDir", MY_APP_WORKSPACE);
        capabilities.setCapability("deviceName", "WindowsPC");
        windowsDriver = new WindowsDriver(new URL("http://127.0.0.1:4723/"), capabilities);

doling0 avatar Mar 30 '21 02:03 doling0

Your application has a splash screen read FAQ

anunay1 avatar Mar 31 '21 15:03 anunay1

Hi @doling0 Try adding capability capabilities.setCapability("ms:waitForAppLaunch", 20); to add some delay

shoaibmansoor avatar Mar 31 '21 17:03 shoaibmansoor

Hi there, I am experiencing the same issue. 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.

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();

khapuhetti avatar Jun 06 '22 22:06 khapuhetti