SUT上でのタイピング

There are several different methods for typing text on systems under test (SUTs). You can type directly into the SUT in Live Mode, automate keystrokes using the TypeText command in your script, and even encode text like passwords using the TypeEncodedText command.

Live Mode(ライブモード)でのタイピング

eggPlant FunctionalでSUTを管理している時に、キーストロークの殆どは自動的にSUTに送られます。しかし、少数のキーストロークやキーのコンビネーションの中には、SUTに送られる前にeggPlant Functionalコンピュータで抑制されるものもあります。(例えばMac OS XではCommand-Tabは、次のアプリケーションに注力を変更します。)

これらのキーボードショートカットをSUTに送るには、Control(管理)メニューのショートカットを選択します。

Automating Keystrokes Using the TypeText Command

SUTのキーストロークを自動化するには、スクリプト内でTypeTextコマンドを使用します。TypeTextは必要な数の以下のパラメータを取り、それぞれをコンマで区切ります。

  • String(文字列):引用符内のテキストで、文字でタイプされたものです。
  • TypeText Keyword: The name of a non-character key (such as Escape), or key that cannot be identified by a character alone, such as keypad numbers. TypeText Keyword(TypeTextキーワード)を参照して、全TypeTextキーワードのリストを見てください。

:TypeTextコマンド

TypeText "Sarah Smith"// Types Sarah Smith on the SUT.

TypeText "Sarah",space,"Smith" // Types Sarah Smith on the SUT.

TypeText ControlKey, AltKey, DeleteKey // Holds down Control and Alt, and presses Delete. (Control and Alt are released at the end of the command.)

TypeText ShiftKey,"Sarah ", "Smith" // Holds the shift key and types SARAH SMITH. (Shift is released at the end of the command.)

TypeTextステートメントを記録する

Viewer(ビューア)ウィンドウで、キーストロークを記録して、TypeTextステートメントを作成できます。Capture(キャプチャ)モードでTypeTextコマンドを開始するには、スペースバーを押すかまたはどれかの文字をタイプします。TypeTextパネルが開きます。In Live mode or Capture mode, you can also click the TypeText button in the Viewer Window toolbar.

TypeTextパネルが開くと、キーストロークはテキストフィールドに挿入されます。Non-character keys and quotation marks are inserted as TypeText keywords; character keys are inserted as literal text. タイプしながら、テキストフィールド内でテキストを選択・編集可能です。

抑制したキーストロークを記録する

TypeTextパネルを使用中に、ある種のキーコマンドが直接タイプ出来ない場合があります。コンピュータが抑制しているからです。For example, the Return key acts as an OK button. To insert one of these key commands into your TypeText statement, choose the command from the Enter Keystroke pop-up menu.

The TypeEncodedText Command

If you need to use a password or other sensitive information in your script and do not want to pass it as plain text, you can use the TypeEncodedText command. It works along with the encodeText and decodeText functions.

Use encodeText to encode plain text, such as a password. The decodeText function returns the encoded text to plain text. The TypeEncodedText command enters the encoded text where specified in a script.

You can use the Insert drop-down list in the Suite window to add the TypeEncodedText command to your script. Select Insert > TypeEncodedText to open the Encoded Text dialog box, then enter the text you want to encode in the Un-encoded field and the optional key in the Key field. Click Save to insert the command and the encoded string into your script.

The EncodedTextSheet window in eggPlant Functional

Enter text that you wish to encode in the EncodedTextSheet dialog.

For more information about these commands and functions, see Text Encryption.

 

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