TouchNextTo ——模拟触摸(用于移动应用程序)。 SendKeys ——模拟键盘输入。 下面的示例演示如何模拟在其标签识别的文本框中的单击,然后在文本框中键入文本: JavaScript, JScript function GetControlByNearbyText() { // Recognize the text of the tested application's main window var wnd = Sys.Process("myA...
The Keys action sends keyboard input to the object, that is, types the specified text in it. Before typing, Keys activates the application window that contains the object and gives that object the input focus. Note that Keys starts typing at the current insertion point within the object. If...
5.5Call Sys.Process(*).frmUserLogin.txt_2.Keys(Enter)在用户名文本框中“输入”内容这是TC封装的另一种输入方法,这种输入方法产生Key事件。5.6Sys.Process(*).frmUserLogin.TXT_.wText = admin输入密码5.7Sys.Process(*).frmUserLogin.CMD_3.ClickButton点击“确定”按钮5.8Sys.Proce 28、ss(*).frmSel...
txt_2.Keys([E nter]) 在用户名文本框中“输入”内容这是TC封装的另一种输入方法,这种输入方法产生 Key事件。 Sys .P rocess(**).frmUserLogi n. TXT_.wText = admi n 输入密码 Sys. Process(**).frmUserLogi n.CMD_3.ClickButt on 点击“确定”按钮 Sys. Process(**).frmSelClie nt.VBObject...
GetTestCompleteObject("Editor").Keys("TestComplete") GetTestCompleteObject("Dummy") End Sub 参考: 《Simple Keyword Framework with TestComplete - Part 1 - The object map》 http://www.theholtons.info/eric/post/2008/05/Simple-Keyword-Framework-with-TestComplete---Part-1---The-object-map.aspx ...
双击Script节点下面的Unit1打开脚本编辑器,输入如下JScript脚本:function OpenNotepad() { var pNotepad; var sContent = "Hello world!", sInputKeys = "Hello world!!"; var strCMD = "cmd /c start Notepad.exe"; var objShell = Sys.OleObject("WScript.Shell"); objShell.Run(strCMD...
20、 Sys.Process("*").frmUserLogin.txt_2.Keys("Enter")l 在用户名文本框中“输入”内容l 这是TC封装的另一种输入方法,这种输入方法产生Key事件。5.6 Sys.Process("*").frmUserLogin.TXT_.wText = "admin"l 输入密码5.7 Sys.Process("*").frmUserLogin.CMD_3.ClickButtonl 点击“确定”按钮5.8 Sys...
or relative to the currently selected item (seeAddressing Tree View Items in Desktop Windows Applications). TheShiftparameter specifies the key or a combination of keys (Ctrl,Shift,Alt) that are pressed during the click. By default, this parameter is not used, so that no shift keys are...
5.5Call Sys.Process("**").frmUserLogin.txt_2.Keys("[Enter]") ●在用户名文本框中“输入”内容 ●这是TC封装的另一种输入方法,这种输入方法产生Key事件。 5.6Sys.Process("**").frmUserLogin.TXT_.wText = "admin" ●输入密码 5.7Sys.Process("**").frmUserLogin.CMD_3.ClickButton ●点击“确定...
txtInfo.value="Need to wait "+ interval +" minutes.";WshShell.sendkeys("{f5}");//refreshWScript.Sleep(60000);//sleep 60sinterval--; } }if(interval==0){varstrCommand ="start "+"TestComplete.exe"+" /r /e \""+ projectPath +"\""; ...