SilkTest でクラスを作成する方法を教えてください。Open Agent を使用しています。クラスを作成しました:
winclass hello
void check()
print("hi")
インクルードファイルに含めましたが、テストスクリプトでオブジェクトを作成するたびに、次のエラーが表示されます
"hello is not a type"
ありがとう
SilkTest でクラスを作成する方法を教えてください。Open Agent を使用しています。クラスを作成しました:
winclass hello
void check()
print("hi")
インクルードファイルに含めましたが、テストスクリプトでオブジェクトを作成するたびに、次のエラーが表示されます
"hello is not a type"
ありがとう
クラスのインスタンスを宣言する必要があります。結果のスクリプトは次のようになります。
[-] 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 など、さらに多くのインスタンスを作成することもできます。