WinAppDriver:在开发中的 uwp 上工作
WinAppDriver : work on an uwp under development
使用测试工具 WinAppDriver,使用以下代码启动应用程序:
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", "appID");
但是对于正在开发中的 uwp,如何获取应用程序 ID?如何在通用 windows 应用程序上使用该工具?
安装您的应用后,您可以使用以下 Powershell 命令找到 packageFullName:
Get-AppxPackage-名称
其中 PackageName 将是您在 AppXManifest(在打包选项卡中)中指定的 PackageName。
查找 PackageFamilyName,这将是您需要在 !App 之前指定的 AppId 的前缀。
例如来自 WinAppDriver 输入示例应用程序:
Get-AppxPackage -Name WinAppDriver.Input
Name : WinAppDriver.Input
Publisher : CN=WinAppDriver, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 1.0.2.0
PackageFullName : WinAppDriver.Input_1.0.2.0_x64__xh1ske9axcpv8
InstallLocation : C:\Program Files\WindowsApps\WinAppDriver.Input_1.0.2.0_x64__xh1ske9axcpv8
IsFramework : False
PackageFamilyName : WinAppDriver.Input_xh1ske9axcpv8
PublisherId : xh1ske9axcpv8
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
Dependencies : {Microsoft.NET.CoreRuntime.1.1_1.1.25305.1_x64__8wekyb3d8bbwe,
Microsoft.VCLibs.140.00.Debug_14.0.25547.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
AppID 为:WinAppDriver.Input_xh1ske9axcpv8!App
使用测试工具 WinAppDriver,使用以下代码启动应用程序:
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", "appID");
但是对于正在开发中的 uwp,如何获取应用程序 ID?如何在通用 windows 应用程序上使用该工具?
安装您的应用后,您可以使用以下 Powershell 命令找到 packageFullName:
Get-AppxPackage-名称
其中 PackageName 将是您在 AppXManifest(在打包选项卡中)中指定的 PackageName。
查找 PackageFamilyName,这将是您需要在 !App 之前指定的 AppId 的前缀。
例如来自 WinAppDriver 输入示例应用程序:
Get-AppxPackage -Name WinAppDriver.Input
Name : WinAppDriver.Input
Publisher : CN=WinAppDriver, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 1.0.2.0
PackageFullName : WinAppDriver.Input_1.0.2.0_x64__xh1ske9axcpv8
InstallLocation : C:\Program Files\WindowsApps\WinAppDriver.Input_1.0.2.0_x64__xh1ske9axcpv8
IsFramework : False
PackageFamilyName : WinAppDriver.Input_xh1ske9axcpv8
PublisherId : xh1ske9axcpv8
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
Dependencies : {Microsoft.NET.CoreRuntime.1.1_1.1.25305.1_x64__8wekyb3d8bbwe,
Microsoft.VCLibs.140.00.Debug_14.0.25547.0_x64__8wekyb3d8bbwe}
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
AppID 为:WinAppDriver.Input_xh1ske9axcpv8!App