通过使用 powershell 命令,我可以获得run dialog
程序 id,即Microsoft.Windows.Shell.RunDialog
. 但是,我无法使用下面的代码进行此操作。任何想法?
DesiredCapabilities desktopCapabilities = new DesiredCapabilities();
desktopCapabilities.SetCapability("app", "Microsoft.Windows.Shell.RunDialog");
desktopCapabilities.SetCapability("deviceName", "WindowsPC");
desktopCapabilities.SetCapability("platformName", "Windows");
session = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), desktopCapabilities);