画像リファレンス

There are several ways to refer to images as command and function parameters:

Image Name

画像名はテキスト文字列であり、引用符で囲まれていなければなりません。ファイル拡張子はオプションです。

例:

Click "ImageOne"

Click "ImageOne.jpg"

画像コレクション

画像コレクションは、基本画像のあらゆる容認可能なバージョンである関連画像のフォルダです。例えば画像コレクションには、ボタンの「通常の」画像、選択されたバージョン、無効化されたバージョンが含まれる場合があります。

Any image folder in your suite can be used as an Image Collection; just keep in mind that Eggplant Functional looks for every image in the Image Collection, so a very large folder could slow down your script execution and cause Eggplant Functional to find matches you are not interested in.

Image Collections are text strings, such as image names. 画像コレクション作成方法の詳細については、画像コレクションを作成するをご覧ください。

例:

Click "SaveButton"

注:ファンクションImageSize()およびImageHotSpot()は、画像コレクションをパラメータとして持つことができません。

コレクションフィルタ

You can use the global property the CollectionFilter to narrow down the images Eggplant Functional looks for within a script, by name, image description, or both.

例:

Set the CollectionFilter to (Name: "German")

Set the CollectionFilter to (Name: "German", Description: "New version")

In the first example, Eggplant Functional would limit searches to images with the string "German" in the image name. 2番目の例では、画像名に"German"を持ち、(スイートエディタの画像ペインに記録されるように)画像説明に"New version"を持つ画像に、検索を制限します。

注:フィルタリング目的では、画像コレクション内の画像のサブパスは名前の一部と見なされます。

画像プロパティリスト

画像プロパティリストとは、デフォルトのプロパティをオーバーライドする機能がある、既存の画像または画像コレクションを指します。すべての画像プロパティリストにはImageNameプロパティが含まれていなければならず、以下のリストからいずれかのプロパティが追加で含まれる場合があります。

  • ImageName: File name. 画像ファイルの名前です。(必須。)

  • HotSpot: Coordinate pair. The image's hot spot, with coordinates relative to the top-left corner of the image.

  • WaitFor: Number. The maximum time Eggplant Functional waits for the given image to appear on the SUT. The default unit of time is seconds; you can also specify minutes.

  • SearchType: Precise, Tolerant, or Smooth. A general measure of how closely colors on the SUT must match the colors of your images.
    Note: The search type Smooth was formerly called Text. If you have existing scripts that use searchType: "text", that code will continue to work the same as searchType: "smooth".
  • Pulsing: Boolean. 当該検索タイプがパルス画像で認められるかどうか。

  • Tolerance: Integer. 画像のピクセルとビューアウィンドウ内の一致との間で容認可能なカラーの差異を表す数値です。You can set a single value that is used for red, green, and blue, or three separate values separated by commas.

  • Discrepancy: Integer. 画像とビューアウィンドウ内の一致で認められる差異のピクセルの割合(パーセント記号あり)またはピクセル数(パーセント記号なし)です。

    Note: Discrepancy can be slow to use and can result in false positive matches. Preferable approaches include setting the Search Type to Smooth in the Image Update panel, cropping the image using the Image Editor, or creating an Image Collection that includes several acceptable versions of a basic image. You can also capture a new image if the current image can only be found using a discrepancy search.
  • CollectionFilter: Text string. 画像コレクションのみ。 CollectionFilterは、画像コレクション内で検索される画像を制限します。(詳細については、上述のコレクションフィルタをご覧ください。)

  • ClipRectangle: Rectangle. cliprectangleは、画像の左上角(0,0)と共に、キャプチャ画像内で長方形を定義する座標のペアです。この長方形内のピクセルのみが、画像一致と見なされます。

  • SearchRectangle: Rectangle. SearchRectangleは、画面の左上角(0,0)と共に、ビューアウィンドウ内で長方形を定義する座標のペアです。Eggplant Functional only looks for this image within the defined rectangle.

  • Rotate: Number. Searches for an image at a given number of degrees of rotation from the angle at which it was captured. See Image Rotation.

例:

Click (ImageName: "CloseButton", HotSpot: (10, 23), SearchType: "Tolerant")

Character Collections

Character collection searches are a special form of image search to be used when OCR cannot find custom fonts on a SUT. Perhaps these fonts are being used along with unusual backgrounds that make OCR searches even more challenging. To overcome problems such as these, use a character collection search instead of an OCR search. See Working with Character Collections for more information.

New feature: Character Collection capture sessions are available in Eggplant Functional 17.2 and later.

 

This topic was last updated on 2月 01, 2019, at 11:13:23 午前.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant