2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
402 stars 140 forks source link

How to Uninstall any program from 'Program and Features' in Control Panel #178

Open Ahsanmumtaz1105 opened 7 years ago

Ahsanmumtaz1105 commented 7 years ago

Hello,

I'm using Winium desktop driver, I've a requirement to unistall a program from Program and Features of Windows 10. I'm not able to select a specific program in Program and Feature window to uninstall, below is the code snippet till i find the Program and Features window but after that I'm not able to select(specific) click program i.e. 7-Zip 16.04 to uninstall. Can some help here?? driver = webdriver.Remote( command_executor='http://localhost:9999', desired_capabilities={ "debugConnectToRunningApp": 'false', "app": r"C:/Windows/System32/appwiz.cpl" }) time.sleep(7) window = driver.find_element_by_class_name('CabinetWClass')

NickAb commented 7 years ago

I think it is better to use PowerShell or other scripting tool to uninstall Windows Features or Apps, unless you are specifically testing that app or feature can be uninstalled via UI.

Here is a link to how to uninstall Windows Feature via PowerShell https://technet.microsoft.com/en-us/library/cc732257(v=ws.11).aspx and here is how to uninstall apps https://stackoverflow.com/questions/113542/how-can-i-uninstall-an-application-using-powershell