microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.4k forks source link

Automate MSI installer (.msi) with WinAppDriver #1451

Open praveenvinnakota opened 3 years ago

praveenvinnakota commented 3 years ago

Hi,

Can we automate MSI installer(.msi) with WinAppDriver? I tried to create a session and I am not able to recognize any controls of the installer.

sample code:

_public static WindowsDriver pokerinstaller = null; DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability("appTopLevelWindow", "C:\Users\XYZ\Downloads\MyApp.msi"); pokerinstaller = new WindowsDriver(new URL("http://127.0.0.1:4723"), cap); pokerinstaller.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

List lstWelcomeScreen = pokerinstaller.findElementsByAccessibilityId("120"); if(!lstWelcomeScreen.isEmpty()) { strWelcomeText = ((RemoteWebElement)lstWelcomeScreen.get(0)).getAttribute("Name"); }_

Please suggest me on how to proceed..

Thanks, Praveen.

anunay1 commented 3 years ago

Is inspect showing the controls

praveenvinnakota commented 3 years ago

Is inspect showing the controls

Hi Anunay,

Yes.. inspect is showing the controls..

Thanks, Praveen.

Shakevg commented 3 years ago

@praveenvinnakota You can try next https://github.com/microsoft/WinAppDriver/issues/1236#issuecomment-756273289