我可以知道如何在SilkTest中创建类吗?我正在使用Open Agent。我创建了一个类:
winclass hello
void check()
print("hi")每当我在Test Script中为它创建一个对象时,我都会将它包含在include file.But中,我得到一个错误消息
"hello is not a type"谢谢
发布于 2011-09-13 20:56:28
你需要声明一个类的实例,生成的脚本应该是这样的:
[-] winclass hello
[-] void check()
[ ] print("Hello world")
[ ]
[ ]
[-] window hello helloWindow
[ ] // this is where you tell silktest how to find helloWindow in your application, for example with an xpath locator
[ ]
[ ]
[-] testcase foo() appstate none
[ ] helloWindow.check()这将打印"Hello World“。您还可以拥有更多实例,如helloWindow1、helloWindow2等。
https://stackoverflow.com/questions/7162605
复制相似问题