Creating an Image Asset

You can create image assets in one of the following ways:
  • By inserting a new image asset into an existing script.
  • During recording.
  • From the menu.

To create a new image asset from the menu, perform the following steps:

  1. In the menu, click Silk4NET > New Image Asset.
  2. Type a useful name for the asset into the Name field and double-click Silk4NET Image Asset. The image asset UI opens.
  3. Select how you want to add an image to the asset.
    • If you want to use an existing image, click Browse and select the image file.
    • If you want to capture a new image from the UI of the application under test, select Capture. If you are testing a Web application, you can select the browser on which you want to capture the image from the Select Browser window.
    • If you want to capture a new image after a delay of three seconds, for example to expand a menu in the application under test before the image is captured, select Capture with Pause.
  4. If you have selected to capture a new image, select the area of the screen that you want to capture and click Capture Selection.
  5. Optional: Click Verify to check if Silk4NET can find the image asset in the UI of the AUT. Web アプリケーションをテストする場合、ブラウザーの選択 ウィンドウからイメージをキャプチャするブラウザーを選択できます。
  6. Optional: Check the Click position check box to select the location on which any clicks on the image asset are performed. The default location is the center of the image. Type the location into the x and y fields or select the location on the image.
  7. 精度レベル を指定します。 精度レベルは、検証されるイメージがテスト対象アプリケーションのイメージと異なっていてもよい度合いを定義し、これを超えて異なっている場合、Silk4NET はイメージが異なっていると判断します。これは、画面解像度が異なる複数のシステムまたはブラウザをテストする場合に役立ちます。誤検出を防ぐため、できるだけ精度レベルを高くすることを推奨します。デフォルトの精度レベル値は、オプションで変更できます。
    注: 精度レベル を 5 未満に設定した場合、イメージの実際の色が比較で考慮されなくなります。イメージのグレースケール表現だけが比較されます。
  8. Save the image asset.

The new image asset is listed under the current project in the Solution Explorer, and you can use it to perform image clicks.

You can add multiple images to the same image asset.

注: To add an image click while recording against a mobile browser, you can right-click in the Recording window and select ImageClick from the action list.