/// <summary> /// 执行测试 /// </summary> public override void ExecuteTest() { Process process = @"C:\Windows\Notepad.exe".CF_StartProgram(); 1.CF_DelaySecond(); AutomationElement app = process.CF_GetElementByProcess(); AutomationElement element = app.CF_GetElementByAutomationId("15"); element.CF_SetTextContent( "Hello World!\n\n" + "H\n" + " E\n" + " L\n" + " L\n" + " O\n" + " W\n" + " O\n" + " R\n" + " L\n" + "D\n\n" + " ------Cmile_96" ); 2.CF_DelaySecond(); process.Kill(); }