What application types are supported by winappdriver



  • I have application which has extension as .msc, I tried it with python I also ran winappdriver before executing this script. I have seen demo codes on some blogs which uses .exe file extension for the app like calculator or notepad, but nothing around .msc. And similar question around this same problem is unanswered here https://stackoverflow.com/questions/67823892/appium-winappdriver-unable-to-automate-jnlp-applications-the-specified-exec Like

    import time
    from appium import webdriver
    

    desired_caps = {}
    desired_caps["app"] = "C:\Desktop\vit extended\vit.msc"
    desired_caps["platformName"] = "Windows"

    driver = webdriver.Remote("http://127.0.0.1:4723", desired_caps)

    time.sleep(4)

    Earlier I was getting below error but got rid of this when I added additional capabilities as appWorkingDir and deviceName-

    Failed to locate opened application window with appId "xxx" and process "xxx"

    but now stumbled upon getting this error -

    The specified Executable is not a valid application for this OS Platform



  • Winappdriver can start executables (generally .exe files on Windows)

    I suspect your .msc file is a management saved console? If so, your actual executable would be mmc.exe (see e.g. here: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mmc ) and your msc file an argument passed to mmc.

    I cannot test this, but I suspect something along these lines should solve your problem:

    from appium import webdriver
    

    desired_caps = {}
    desired_caps["app"] = "Wherever mmc is on your system\mmc.exe"
    desired_caps["appArguments"] = "C:\Desktop\vit extended\vit.msc"
    desired_caps["platformName"] = "Windows"

    driver = webdriver.Remote("http://127.0.0.1:4723", desired_caps)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2