【发布时间】:2013-09-06 20:52:36
【问题描述】:
我正在尝试创建一个编码的 UI 属性来检查打开的 WMP 文件。
public BrowserWindow VideoWindow
{
get
{
if (this._videoWindow == null || !this._videoWindow.Exists)
{
this._videoWindow = new BrowserWindow();
this._videoWindow.SearchProperties["Name"] = "Windows Media Player";
this._videoWindow.SearchProperties["ControlType"] = "Window";
}
return this._videoWindow;
}
}
显然,这行不通。最初,该应用程序打开了一个视频网站的链接。所以这行得通,但由于它与 BrowserWindow 有很大不同,我不知道该怎么做。如何使用 Coded UI 来“抓取”它?
【问题讨论】:
-
您是否尝试在 proccess.GetProcessByName 或 GetProccesses 中查找它?
标签: c# testing coded-ui-tests windows-media-player