C# MainWindowTitle是一个空字符串(";)
执行测试用例时抛出错误“测试运行部署问题: 无法获取部署项“%TEST%\n”的文件(输出) 目录“en”):System.IO.FileNotFoundException:找不到文件 'C:\output\Debug\bin\en' 调试代码时,我知道服务器的主窗口标题为空。我将在Internet explorer上执行,但IExplorer服务器未启动 有人能帮我解决这个问题吗。 这里是我的流程代码C# MainWindowTitle是一个空字符串(";),c#,internet-explorer,selenium-webdriver,C#,Internet Explorer,Selenium Webdriver,执行测试用例时抛出错误“测试运行部署问题: 无法获取部署项“%TEST%\n”的文件(输出) 目录“en”):System.IO.FileNotFoundException:找不到文件 'C:\output\Debug\bin\en' 调试代码时,我知道服务器的主窗口标题为空。我将在Internet explorer上执行,但IExplorer服务器未启动 有人能帮我解决这个问题吗。 这里是我的流程代码 public static Process GetSingleProcessWithMain
public static Process GetSingleProcessWithMainWindowTitle(string name, IEnumerable<Process> exceptList )
{
var processes = GetProcesses(name, exceptList);
var process = processes.Single(proc => !string.IsNullOrWhiteSpace(proc.MainWindowTitle));
return process;
}
公共静态进程GetSingleProcessWithMainWindowTitle(字符串名称,IEnumerable例外列表)
{
var processs=getprocesss(名称,exceptList);
var process=processs.Single(proc=>!string.IsNullOrWhiteSpace(proc.MainWindowTitle));
返回过程;
}
所以当主窗口的标题为空时,您需要做些什么?正确吗?或者您需要注意其他应用程序的标题是否变为空?是的,我需要阅读窗口名表单标题位于此.Text
属性中。您可以通过此.TextChanged
事件捕获它