又有一个问题了,麻烦斑竹:
在QTP里面,如果一个控件在录制的时候,QTP没有录入正确,我可以手工修改,甚至可以在Object Repository里面加一个对象。但是同样的情况,要是出现在SilkTest里面,要如何处理呢?我就是拿SilkTest录了QTP里面自带的航空订票系统很少的几个步骤,但是老是回放出错,原先录制的是点击“Insert Order”然后点击“Updata Order”,但是回放的时候总是只点击“Insert Order”,然后居然又出现了一个“Login”窗口,没有点击“Updata Order”,这种情况我录了几次都是这样,很痛苦,这是为什么啊?我怀疑是系统把按钮的对象属性认错了,但是在哪里修改对象的属性呢?作者: asks_zhuang 时间: 2006-1-11 13:45 标题: 先看看这篇文章,帮助文件里面也有 Handling login windows in non-Web applications
Although a non-Web application抯 main window is usually displayed first, it is also common for a login or security window to be displayed before the main window.
Use the wStartup constant and the Invoke method
To handle login windows, you need to record a declaration for the login window, set the value of the wStartup constant, and write a new Invoke method for the main window that enters the appropriate information into the login window and dismisses it. This enables the DefaultBaseState routine to perform the actions necessary to get past the login window.
Note You do not need to use this procedure for splash screens, which disappear on their own.
To handle login windows:
1 Activate the login window and record a declaration for it selecting the Record/Declarations menu command. (See
Record menu.) Paste the resulting dialog declaration to the test frame file.
2 In your test frame file, find the stub of the declaration for the wStartup constant, located at the top of the declaration for the main window:
// First window to appear when application is invoked
// const wStartup = ?
3 Complete the declaration for the wStartup constant by:
?Removing the comment characters (the two forward slash characters) at the beginning of the declaration.
?Replacing the question mark with the identifier of the login window, as recorded in the window declaration for the login window.
4 Define an Invoke method in the main window declaration that calls the built-in Invoke method and additionally performs any actions required by the login window, such as entering a name and password.
Example
After following this procedure, your test frame might look like this: