diff --git a/docs_source_files/content/legacy_docs/selenium_ide.ja.md b/docs_source_files/content/legacy_docs/selenium_ide.ja.md index 1fb3de892409..d5aa01a5f12c 100644 --- a/docs_source_files/content/legacy_docs/selenium_ide.ja.md +++ b/docs_source_files/content/legacy_docs/selenium_ide.ja.md @@ -1,278 +1,238 @@ --- -title: "Legacy Selenium IDE" +title: "レガシー Selenium IDE" weight: 4 --- -{{% notice info %}} - Page being translated from -English to Japanese. Do you speak Japanese? Help us to translate -it by sending us pull requests! -{{% /notice %}} +## 紹介 -## Introduction +Selenium-IDE (統合開発環境) は、Selenium テストケースを開発するためのツールです。 +Selenium-IDE は使いやすい Firefox プラグインで、一般にテストケースを開発するための最も効率的な方法です。 +Selenium-IDE ではコンテキストメニューも使用できます。 +コンテキストメニューを使うと、まず現在ブラウザに表示されているページ上の UI 要素を選択し、次に Selenium コマンドのリストから目的のコマンドを選択できます。 +コマンドのパラメータは、選択された UI 要素のコンテキストに従って、あらかじめ定義されたものが使われます。 +Selenium-IDE を使う方法は、時間の節約になるだけでなく、Selenium スクリプトの構文を学ぶ手段としても優れています。 -The Selenium-IDE (Integrated Development Environment) is the tool you use to -develop your Selenium test cases. It’s an easy-to-use Firefox plug-in and is -generally the most efficient way to develop test cases. It also contains a -context menu that allows you to first select a UI element from the browser’s -currently displayed page and then select from a list of Selenium commands with -parameters pre-defined according to the context of the selected UI element. -This is not only a time-saver, but also an excellent way of learning Selenium -script syntax. +この章では Selenium-IDE について詳しく取り上げ、Selenium-IDE を効果的に使う方法について説明します。 -This chapter is all about the Selenium IDE and how to use it effectively. +## IDEのインストール -## Installing the IDE +Firefoxを使用して、最初にSeleniumHQ[ダウンロードページ](https://selenium.dev/downloads)からIDEをダウンロードします。 -Using Firefox, first, download the IDE from the SeleniumHQ [downloads page](https://selenium.dev/downloads) - -Firefox will protect you from installing addons from unfamiliar locations, so -you will need to click ‘Allow’ to proceed with the installation, as shown in -the following screenshot. +Firefoxは、不慣れな場所からアドオンをインストールしないように保護するため、次のスクリーンショットに示すように、インストールを続行するには'許可'をクリックする必要があります。 ![Selenium IDE Installation 1](/images/legacy_docs/selenium_ide_installation_1.png) -When downloading from Firefox, you’ll be presented with the following window. +Firefoxからダウンロードすると、次のウィンドウが表示されます。 ![Selenium IDE Installation 2](/images/legacy_docs/selenium_ide_installation_2.png) -Select Install Now. The Firefox Add-ons window pops up, first showing a progress bar, -and when the download is complete, displays the following. +「今すぐインストール」を選択します。 +Firefoxの「アドオン」ウィンドウがポップアップし、最初にプログレスバーが表示されます。 +ダウンロードが完了すると、次のような画面になります。 ![Selenium IDE Installation 3](/images/legacy_docs/selenium_ide_installation_3.png) -Restart Firefox. After Firefox reboots you will find the Selenium-IDE listed under -the Firefox Tools menu. +Firefoxを再起動します。 +Firefoxの再起動後、Firefoxの「ツール」メニューには、「Selenium-IDE」が表示されます。 ![Selenium IDE Installation 4](/images/legacy_docs/selenium_ide_installation_4.png) -## Opening the IDE +## IDEを開く -To run the Selenium-IDE, simply select it from the Firefox Tools menu. It opens -as follows with an empty script-editing window and a menu for loading, or -creating new test cases. +Selenium-IDEを実行するには、Firefoxの「ツール」メニューから「Selenium-IDE」を選択するだけです。 +空のスクリプト編集ウィンドウと、テストケースを読み込んだり新規作成したりするメニューのある Selenium-IDE のウィンドウが表示されます。 ![Selenium IDE Open](/images/legacy_docs/selenium_ide_open.png) -## IDE Features +## IDEの機能 -### Menu Bar +### メニューバー -The File menu has options for Test Case and Test Suite (suite of Test Cases). -Using these you can add a new Test Case, open a Test Case, save a Test Case, -export Test Case in a language of your choice. You can also open the recent -Test Case. All these options are also available for Test Suite. +「ファイル」メニューには、テストケースとテストスイート(テストケースのスイート)のオプションがあります。 +これらを使用して、新しいテストケースを追加し、テストケースを開き、テストケースを保存し、選択した言語でテストケースをエクスポートできます。 +最近のテストケースを開くこともできます。 +これらすべてのオプションは、テストスイートでも使用できます。 -The Edit menu allows copy, paste, delete, undo, and select all operations for -editing the commands in your test case. The Options menu allows the changing of -settings. You can set the timeout value for certain commands, add user-defined -user extensions to the base set of Selenium commands, and specify the format -(language) used when saving your test cases. The Help menu is the standard -Firefox Help menu; only one item on this menu–UI-Element Documentation–pertains -to Selenium-IDE. +「編集」メニューでは、テストケースのコマンドを編集するためのすべての操作をコピー、貼り付け、削除、元に戻す、選択できます。 +「オプション」メニューでは、さまざまな設定を変更できます。 +特定のコマンドのタイムアウト値を設定し、Seleniumコマンドの基本セットにユーザー定義のユーザー拡張機能を追加し、テストケースを保存するときに使用する形式(言語)を指定できます。 +「ヘルプ」メニューは Firefox 標準の「ヘルプ」メニューで、この中の 「UI-Element Documentation」 だけが Selenium-IDE に関係のある項目です。 -### Toolbar +### ツールバー -The toolbar contains buttons for controlling the execution of your test cases, -including a step feature for debugging your test cases. The right-most button, -the one with the red-dot, is the record button. +ツールバーには、テストケースをデバッグするためのステップ実行機能をはじめ、テストケースの実行をコントロールするためのさまざまなボタンが並んでいます。 +右端の赤い丸のボタンは、「Record」(記録) ボタンです。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_1.png) ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_2.png) -Speed Control: controls how fast your test case runs. +「Speed Control」 (速度調節): テストケースの実行速度を調節します。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_3.png) -Run All: Runs the entire test suite when a test suite with multiple test cases is loaded. +「Run All」 (すべて実行): 複数のテストケースを持つテストスイートが読み込まれているときにテストスイート全体を実行します。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_4.png) -Run: Runs the currently selected test. When only a single test is loaded -this button and the Run All button have the same effect. +「Run」 (実行): 現在選択されているテストを実行します。 +テストが1つしか読み込まれていない場合、このボタンと「Run All」ボタンの動作は同じです。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_5.png) ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_6.png) -Pause/Resume: Allows stopping and re-starting of a running test case. +「Pause」 / 「Resume」 (一時停止/再開) : 実行中のテストを一時停止または再開します。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_7.png) -Step: Allows you to “step” through a test case by running it one command at a time. -Use for debugging test cases. +「Step」(ステップ実行): コマンドを1つずつ実行し、テストケースの「1ステップ実行」を行います。 +テストケースをデバッグするときに使います。 + ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_8.png) -TestRunner Mode: Allows you to run the test case in a browser loaded with the -Selenium-Core TestRunner. The TestRunner is not commonly used now and is likely -to be deprecated. This button is for evaluating test cases for backwards -compatibility with the TestRunner. Most users will probably not need this -button. +「TestRunner Mode」 (TestRunner モード): テストケースを Selenium-Core TestRunner で読み込んでブラウザで実行することができます。 +TestRunner は今はあまり使われておらず、いずれ非推奨となるでしょう。 +このボタンは、テストケースを評価して、TestRunner との後方互換性があるかどうかを調べるために用意されています。 +ほとんどのユーザーは、このボタンを使う必要はないでしょう。 + ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_9.png) -Apply Rollup Rules: This advanced feature allows repetitive sequences of -Selenium commands to be grouped into a single action. Detailed documentation on -rollup rules can be found in the UI-Element Documentation on the Help menu. +「Apply Rollup Rules」(ロールアップルールを適用): この高度な機能を利用すると、一連の Selenium コマンドの繰り返しを 1 つのアクションにまとめることができます。 +ロールアップルールの詳細については、「ヘルプ」 メニューの [UI-Element Documentation] を参照してください。 ![Selenium IDE Features](/images/legacy_docs/selenium_ide_features_10.png) -### Test Case Pane +### テストケース ペイン -Your script is displayed in the test case pane. It has two tabs, one for -displaying the command and their parameters in a readable “table” format. +スクリプトは「テストケース」ペインに表示されます。 +ペインには2つのタブがあります。 +次に示すのは、コマンドとそのパラメータを読みやすい「テーブル」形式で表示するための [「テーブル」タブです。 ![Selenium IDE Image Pane](/images/legacy_docs/selenium_ide_image_pane.png) -The other tab - Source displays the test case in the native format in which the -file will be stored. By default, this is HTML although it can be changed to a -programming language such as Java or C#, or a scripting language like Python. -See the Options menu for details. The Source view also allows one to edit the -test case in its raw form, including copy, cut and paste operations. +もう 1 つの「ソース」タブには、テストケースがネイティブ形式で表示されます。 +ファイルはこのネイティブ形式で保存されます。 +デフォルトでは HTML ですが、Java や C# などのプログラミング言語、あるいは Python などのスクリプト言語に変更することもできます。 +詳細については、「オプション」 メニューを参照してください。 +「ソース」 タブでは、テストケースを生の形式で編集することができ、操作のコピー、切り取り、貼り付けが可能です。 -The Command, Target, and Value entry fields display the currently selected -command along with its parameters. These are entry fields where you can modify -the currently selected command. The first parameter specified for a command in -the Reference tab of the bottom pane always goes in the Target field. If a -second parameter is specified by the Reference tab, it always goes in the Value -field. +「コマンド」、「対象」、および 「値」 入力フィールドには、現在選択されているコマンドとそのパラメータが表示されます。 +これらの入力フィールドでは、現在選択されているコマンドを修正できます。 +一番下のペインの 「リファレンス」 タブで、コマンドに対して指定されている 1 つ目のパラメータは、必ず 「対象」 フィールドに入力します。 +「リファレンス」 タブで 2 つ目のパラメータが指定されている場合、このパラメータは 「値」 フィールドに入力します。 ![Selenium IDE Entry Fields](/images/legacy_docs/selenium_ide_entry_fields.png) -If you start typing in the Command field, a drop-down list will be populated -based on the first characters you type; you can then select your desired -command from the drop-down. +「コマンド」フィールドに文字を入力すると、入力した文字に応じてドロップダウンリストに項目が表示されるので、このリストから目的のコマンドを選択できます。 -### Log/Reference/UI-Element/Rollup Pane +### ログ/参照/UI要素/ロールアップペイン -The bottom pane is used for four different functions–Log, Reference, -UI-Element, and Rollup–depending on which tab is selected. +一番下のペインは、さまざまな機能で使われます。 +「ログ」、「リファレンス」、「UI-Element」、および 「Rollup」 の4つのタブがあります。 -#### Log +#### ログ -When you run your test case, error messages and information messages showing -the progress are displayed in this pane automatically, even if you do not first -select the Log tab. These messages are often useful for test case debugging. -Notice the Clear button for clearing the Log. Also notice the Info button is a -drop-down allowing selection of different levels of information to log. +テストケースを実行すると、「ログ」 タブを選択していなくても、エラーメッセージとテストの進行状況を示す情報メッセージが自動的にこのペインに表示されます。 +これらのメッセージは、しばしばテストケースのデバッグに役立ちます。 +ログを消去するには 「消去」 ボタンをクリックします。 +「情報」 ボタンをクリックすると、ドロップダウンリストが表示されます。 +リストで目的の項目を選択すれば、画面に表示する情報のレベルを指定できます。 ![Selenium IDE Bottom Box](/images/legacy_docs/selenium_ide_bottom_box.png) -#### Reference +#### リファレンス -The Reference tab is the default selection whenever you are entering or -modifying Selenese commands and parameters in Table mode. In Table mode, the -Reference pane will display documentation on the current command. When entering -or modifying commands, whether from Table or Source mode, it is critically -important to ensure that the parameters specified in the Target and Value -fields match those specified in the parameter list in the Reference pane. The -number of parameters provided must match the number specified, the order of -parameters provided must match the order specified, and the type of parameters -provided must match the type specified. If there is a mismatch in any of these -three areas, the command will not run correctly. +「リファレンス」 タブは、「テーブル」 タブで Selenese コマンドとパラメータを入力したり修正したりする場合にデフォルトで選択されるタブです。 +「テーブル」 タブが表示されている場合、「リファレンス」 ペインには現在のコマンドのリファレンスが表示されます。 +「テーブル」 タブの 「ソース」 タブのどちらで作業している場合も、コマンドを入力または修正するときは、「対象」 フィールドと 「値」 フィールドで指定するパラメータが、「リファレンス」 ペインのパラメータリストに指定されているものと一致していることを確認することが非常に重要です。 +指定するパラメータの数は、「リファレンス」 ペインで指定されている数と一致しなければならず、パラメータの順序も 「リファレンス」 ペインのそれと一致しなければなりません。 +さらに、指定するパラメータの型も、「リファレンス」 ペインで指定されている型と一致していなければなりません。 +これら 3つのうち、1つでも一致しないものがあれば、コマンドは正常に実行されません。 ![Selenium IDE Bottom Box](/images/legacy_docs/selenium_ide_bottom_box_ref.png) -While the Reference tab is invaluable as a quick reference, it is still often -necessary to consult the Selenium Reference document. +「リファレンス」 タブはクイックリファレンスとして大いに役立ちますが、Seleniumリファレンスを参照することもしばしば必要になります。 + +#### UI-ElementとRollup -#### UI-Element and Rollup +これらの2つのペイン (高度な機能を扱うためのペイン) については、Selenium-IDE の 「ヘルプ」 メニューの 「UI-Element Documentation」 を参照してください。 -Detailed information on these two panes (which cover advanced features) can be -found in the UI-Element Documentation on the Help menu of Selenium-IDE. +## テストケースの作成 -## Building Test Cases +テストケースを開発するための主な方法は3つあります。 +多くの場合、テスト開発者はこれら 3 つのテクニックをすべて使う必要があります。 -There are three primary methods for developing test cases. Frequently, a test -developer will require all three techniques. +### 記録 -### Recording +Selenium を初めて使うユーザーは、Web サイトでの操作を記録してテストケースを作成することが多いようです。Selenium-IDE を最初に開いたとき、「Record」 ボタンはデフォルトでオンになっています。 -Many first-time users begin by recording a test case from their interactions -with a website. When Selenium-IDE is first opened, the record button is ON by -default. If you do not want Selenium-IDE to begin recording automatically you -can turn this off by going under Options > Options… and deselecting “Start -recording immediately on open.” +Selenium-IDEで自動的に記録を開始したくない場合は、Options > Options… に移動し、"Start recording immediately on open."の選択を解除して、これをオフにできます。 -During recording, Selenium-IDE will automatically insert commands into your -test case based on your actions. Typically, this will include: +記録中は、ユーザーの操作に基づいて Selenium-IDE がテストケースにコマンドを自動的に挿入します。 +次に示すのは、典型的なユーザーの操作です。 -* clicking a link - click or clickAndWait commands -* entering values - type command -* selecting options from a drop-down listbox - select command -* clicking checkboxes or radio buttons - click command +* リンクをクリックする - click または clickAndWait コマンド +* 値を入力する - type コマンド +* ドロップダウンリストボックスからオプションを選択する - select コマンド +* チェックボックスまたはラジオボタンをクリックする - click コマンド -Here are some “gotchas” to be aware of: +いくつか注意すべき点を次に示します。 -* The type command may require clicking on some other area of the web page for it -to record. -* Following a link usually records a click command. You will often need to change -this to clickAndWait to ensure your test case pauses until the new page is -completely loaded. Otherwise, your test case will continue running commands -before the page has loaded all its UI elements. This will cause unexpected test -case failures. +* typeコマンドが記録されるようにするには、Web ページ上のどこか別の場所をクリックする操作が必要になる場合があります。 +* リンクをたどる操作は、通常は click コマンドとして記録されます。 + 多くの場合、 click コマンドは clickAndWait に変更して、新しいページが完全に読み込まれるまでテストケースを確実に停止させる必要があります。 + そうしないと、ページに含まれるすべての UI 要素が読み込まれる前にテストケースの実行が先に進み、予期しない形でテストケースが失敗することになります。 -### Adding Verifications and Asserts With the Context Menu +### コンテキストメニューを使った検証とアサートの追加 -Your test cases will also need to check the properties of a web-page. This -requires assert and verify commands. We won’t describe the specifics of these -commands here; that is in the chapter on Selenium Commands – “Selenese”. Here -we’ll simply describe how to add them to your test case. +テストケースでは、Web ページのプロパティをチェックする必要もあるでしょう。 +それには、 assert コマンドと verify コマンドを使う必要があります。 +ここでは、これらのコマンドの細かな点には触れません。 +テストケースに追加する方法だけを説明します。 +コマンドの詳細については、 “Selenese” Selenium コマンド に関する章を参照してください。 -With Selenium-IDE recording, go to the browser displaying your test application -and right click anywhere on the page. You will see a context menu showing -verify and/or assert commands. +Selenium-IDE の記録機能がオンの状態で、テスト対象のアプリケーションを表示しているブラウザを選択し、ページ上の任意の場所を右クリックします。 +すると、 verify コマンドや assert コマンドを含むコンテキストメニューが表示されます。 -The first time you use Selenium, there may only be one Selenium command listed. -As you use the IDE however, you will find additional commands will quickly be -added to this menu. Selenium-IDE will attempt to predict what command, along -with the parameters, you will need for a selected UI element on the current -web-page. +初めて Selenium を使う場合には、Selenium コマンドが1つしか表示されないかもしれません。 +しかし、IDE を使っていると、メニューに表示されるコマンドがどんどん増えていきます。 +Selenium-IDE は、現在の Web ページ上で選択されている UI 要素に応じて、必要なコマンドとパラメータの予測を試みます。 -Let’s see how this works. Open a web-page of your choosing and select a block -of text on the page. A paragraph or a heading will work fine. Now, right-click -the selected text. The context menu should give you a verifyTextPresent command -and the suggested parameter should be the text itself. +実際にこの機能をためしてみましょう。 +適当な Web ページを開き、ページ上のテキストを選択します。 +段落1つか、見出しがいいでしょう。 +次に、選択したテキストを右クリックします。 +コンテキストメニューが表示され、 verifyTextPresent コマンドと、このコマンドにふさわしいパラメータとして、選択されたテキスト自体が表示されるはずです。 -Also, notice the Show All Available Commands menu option. This shows many, many -more commands, again, along with suggested parameters, for testing your -currently selected UI element. +また、「利用可能な全てのコマンド」 という項目があることに注目してください。 +この項目を選択すると、非常に多くのコマンドが、現在選択されている UI 要素のテストに適したパラメータ案とともに表示されます。 -Try a few more UI elements. Try right-clicking an image, or a user control like -a button or a checkbox. You may need to use Show All Available Commands to see -options other than verifyTextPresent. Once you select these other options, the -more commonly used ones will show up on the primary context menu. For example, -selecting verifyElementPresent for an image should later cause that command to -be available on the primary context menu the next time you select an image and -right-click. +いくつかほかの UI 要素についても、同じようにためしてみてください。 +たとえば、画像を右クリックしたり、ボタンやチェックボックスなどのユーザーコントロールを右クリックしたりしてみてください。 +verifyTextPresent 以外のオプションを見るには、「利用可能な全てのコマンド」 を使う必要があるかもしれません。 +いったんほかのオプションを選択すると、よく使われるコマンドがトップレベルのコンテキストメニューに表示されるようになります。 +たとえば、画像に対して verifyElementPresent を選択すると、次に画像を選択して右クリックしたときに、トップレベルのコンテキストメニューにこのコマンドが表示されるようになります。 -Again, these commands will be explained in detail in the chapter on Selenium -commands. For now though, feel free to use the IDE to record and select -commands into a test case and then run it. You can learn a lot about the -Selenium commands simply by experimenting with the IDE. +繰り返しになりますが、これらのコマンドの詳細については、Selenium のコマンドに関する章で説明します。 +とりあえずここでは、IDE を使ってさまざまなコマンドをテストケースに記録、選択し、テストケースを実行してみてください。IDE を使っていうちに、Selenium のコマンドについても自然に多くのことを学べるはずです。 -### Editing +### 編集 -#### Insert Command +#### コマンドの挿入 -##### Table View +##### テーブル タブ -Select the point in your test case where you want to insert the command. To do -this, in the Test Case Pane, left-click on the line where you want to insert a -new command. Right-click and select Insert Command; the IDE will add a blank -line just ahead of the line you selected. Now use the command editing text -fields to enter your new command and its parameters. +テストケース内のコマンドを挿入する場所を選択します。 +右クリックして 「コマンドを挿入」 をクリックします。 +コマンド編集用のテキストフィールドを使って、新しいコマンドとそのパラメータを入力します。 -##### Source View +##### ソース タブ -Select the point in your test case where you want to insert the command. To do -this, in the Test Case Pane, left-click between the commands where you want to -insert a new command, and enter the HTML tags needed to create a 3-column row -containing the Command, first parameter (if one is required by the Command), -and second parameter (again, if one is required to locate an element) and third -parameter(again, if one is required to have a value). Example: +テストケース内のコマンドを挿入する場所を選択し、3 列からなる行を 1 つ作成するのに必要な HTML タグを入力します。 +この行の 1 列目にはコマンドを、2 列目には最初のパラメータを (パラメータが必要な場合)、3 列目には 2 つ目のパラメータを (パラメータが必要な場合) 入力します。「テーブル」 タグに戻るときは、その前にテストケースを保存します。 ```html @@ -282,173 +242,150 @@ parameter(again, if one is required to have a value). Example: ``` -#### Insert Comment +#### コメントの挿入 -Comments may be added to make your test case more readable. These comments are -ignored when the test case is run. +テストケースの可読性を高めるためにコメントを入力できます。 +テストケースの実行時にはコメントは無視されます。 -Comments may also be used to add vertical white space (one or more blank lines) -in your tests; just create empty comments. An empty command will cause an error -during execution; an empty comment won’t. +垂直方向の空白 (1 行以上の空白行) をテストに追加するには、空のコメントを作成する必要があります。 +空のコマンドでは実行時にエラーが発生します。 -##### Table View +##### テーブル タブ -Select the line in your test case where you want to insert the comment. -Right-click and select Insert Comment. Now use the Command field to enter the -comment. Your comment will appear in purple text. +テストケース内のコメントを挿入する場所を選択します。 +右クリックして 「コメントを挿入」 をクリックします。 +「コマンド」 フィールドにコメントを入力します。 +入力したコメントは紫色のフォントで表示されます。 -##### Source View +##### ソース タブ -Select the point in your test case where you want to insert the comment. Add an -HTML-style comment, i.e., ``. +テストケース内のコメントを挿入する場所を選択します。 +HTML スタイルのコメント、すなわち ` Add Test Case menu option. This allows you to add existing test cases to -a new test suite. +既存のテストケースをテストスイートに読み込む操作は、Selenium-IDE ではまだサポートされていません。既存のテストケースを追加して、テストスイートを作成または修正するには、ユーザーが手動でテストスイートファイルを編集する必要があります。 -A test suite file is an HTML file containing a one-column table. Each -cell of each row in the section contains a link to a test case. -The example below is of a test suite containing four test cases: +テストスイートファイルは、1 列のテーブルを含む HTML ファイルです。 +<tbody> セクション内の各行のセルには、テストケースへのリンクが収められています。 +次に示すのは、4 つのテストケースを含むテストスイートの例です。 ```html @@ -1596,125 +1353,95 @@ The example below is of a test suite containing four test cases: ``` -Note: Test case files should not have to be co-located with the test suite file - that invokes them. And on Mac OS and Linux systems, that is indeed the - case. However, at the time of this writing, a bug prevents Windows users - from being able to place the test cases elsewhere than with the test suite - that invokes them. - -## User Extensions - -User extensions are JavaScript files that allow one to create his or her own -customizations and features to add additional functionality. Often this is in -the form of customized commands although this extensibility is not limited to -additional commands. - -There are a number of useful extensions_ created by users. +注 : テストケースファイルは、呼び出し元のテストスイートファイルと同じ場所に置く必要はありません。 + 実際、Mac OS と Linux システムではそのとおりです。 + ただし、この項目の執筆時点では、Windows システムで使う場合にはバグがあって、テストケースファイルを呼び出し元のテストスイートファイルと別の場所に置くことはできません。 + +## ユーザー拡張スクリプト -*IMPORTANT: THIS SECTION IS OUT OF DATE--WE WILL BE REVISING THIS SOON.* +ユーザー拡張スクリプトは、ユーザー独自のカスタマイズや機能を作成して Selenium の機能を拡張できる JavaScript ファイルです。 +多くの場合、コマンドのカスタマイズという形を取りますが、ユーザー拡張スクリプトによる機能拡張はコマンドの追加だけに限定されません。 + +重要 : このセクションは期限切れです。近日中に改訂します。 + +ユーザーが作成した多くの有益な 拡張スクリプト があります。 * _extensions: http://wiki.openqa.org/display/SEL/Contributed+User-Extensions .. _[`goto_sel_ide.js extension`](http://wiki.openqa.org/download/attachments/379/goto_sel_ide.js): -Perhaps the most popular of all Selenium-IDE extensions -is one which provides flow control in the form of while loops and primitive -conditionals. This extension is the goto_sel_ide.js_. For an example -of how to use the functionality provided by this extension, look at the -page_ created by its author. +おそらく Selenium-IDE のすべての拡張スクリプトの中で最も人気があるのは、while ループとプリミティブな条件判定によってフロー制御を可能にする goto_sel_ide.js でしょう。 +この拡張スクリプトの使用例については、作者が用意した ページ を参照してください。 -To install this extension, put the pathname to its location on your -computer in the **Selenium Core extensions** field of Selenium-IDE's -Options=>Options=>General tab. +この拡張スクリプトをインストールするには、Selenium-IDE の "オプション" メニューで "設定" をクリックし、 "一般" タブの **Selenium Core 拡張スクリプト (user-extension.js) のパス** フィールドに、ファイルのパス名を入力します。 ![Selenium IDE Extensions Install](/images/legacy_docs/selenium_ide_extensions_install.png) -After selecting the **OK** button, you must close and reopen Selenium-IDE -in order for the extensions file to be read. Any change you make to an -extension will also require you to close and reopen Selenium-IDE. +**OK** ボタンをクリックしたら、拡張スクリプトを読み込むために、Selenium-IDE をいったん閉じて開く必要があります。 +また、拡張スクリプトに変更を加えた場合も、Selenium-IDE をいったん閉じて開く必要があります。 -Information on writing your own extensions can be found near the -bottom of the Selenium Reference_ document. +独自の拡張スクリプトを作成する方法については、Selenium リファレンス ドキュメントの終わりの方に説明があります。 -Sometimes it can prove very useful to debug step by step Selenium IDE and your -User Extension. The only debugger that appears able to debug -XUL/Chrome based extensions is Venkman which is supported in Firefox until version 32 included. -The step by step debug has been verified to work with Firefox 32 and Selenium IDE 2.9.0. +ステップごとにSelenium IDEとユーザー拡張機能をデバッグすると非常に役立つことがあります。 +XUL/Chromeベースの拡張機能をデバッグできると思われる唯一のデバッガーは、バージョン32が含まれるまでFirefoxでサポートされているVenkmanです。 +段階的なデバッグは、Firefox 32およびSelenium IDE 2.9.0で動作することが確認されています。 -## Format +## フォーマット (形式) -Format, under the Options menu, allows you to select a language for saving -and displaying the test case. The default is HTML. - -If you will be using Selenium-RC to run your test cases, this feature is used -to translate your test case into a programming language. Select the -language, e.g. Java, PHP, you will be using with Selenium-RC for developing -your test programs. Then simply save the test case using File=>Export Test Case As. -Your test case will be translated into a series of functions in the language you -choose. Essentially, program code supporting your test is generated for you -by Selenium-IDE. - -Also, note that if the generated code does not suit your needs, you can alter -it by editing a configuration file which defines the generation process. -Each supported language has configuration settings which are editable. This -is under the Options=>Options=>Formats tab. - -## Executing Selenium-IDE Tests on Different Browsers +"オプション" メニューの "設定" をクリックすると表示される "フォーマット" タブでは、テストケースの保存と表示に使う言語を選択できます。 +デフォルトは "HTML" です。 + +作成したテストケースを Selenium-RC を使って実行する場合には、作成されたテストケースをプログラミング言語に変換するためにこの機能が使われます。 +テストプログラムの開発用に Selenium-RC で使う言語 ("Java"、"PHP" など) を選択し、次に "ファイル" メニューの "保存" を使ってテストケースを保存します。 +これで、テストケースは、選択した言語の一連の関数に変換されます。 +テストをサポートするプログラムコードは、基本的に、ユーザーに代わって Selenium-IDE によって生成されます。 -While Selenium-IDE can only run tests against Firefox, tests -developed with Selenium-IDE can be run against other browsers, using a -simple command-line interface that invokes the Selenium-RC server. This topic -is covered in the :ref:`Run Selenese tests ` section on Selenium-RC -chapter. The *-htmlSuite* command-line option is the particular feature of interest. +生成されたコードが自分のニーズに合わないときは、生成プロセスが定義された設定ファイルを編集することで、生成されるコードを変更できることに注意してください。サポートされている言語ごとに設定があり、これらの設定を編集できます。設定は、"オプション" メニューの "設定" をクリックすると表示される "フォーマット" タブにあります。 -## Troubleshooting +## 異なるブラウザでの Selenium-IDE テストの実行 -Below is a list of image/explanation pairs which describe frequent -sources of problems with Selenium-IDE: +Selenium-IDE 自体は Firefox を対象にしたテストしか実行できませんが、Selenium-IDE で作成したテストは、Selenium-RC サーバーを呼び出すシンプルなコマンドラインインタフェースを使うことで、ほかのブラウザを対象に実行することができます。 +詳細については、Selenium-RC に関する章の `Selenese テストの実行` を参照してください。 +特に関連性が高いのは、 -htmlSuite コマンドラインオプションです。 -*Table view is not available with this format.* +## トラブルシューティング -This message can be occasionally displayed in the Table tab when Selenium IDE is -launched. The workaround is to close and reopen Selenium IDE. See -[issue 1008](http://code.google.com/p/selenium/issues/detail?id=1008). -for more information. If you are able to reproduce this reliably then please -provide details so that we can work on a fix. +以下は、Selenium-IDE で発生することが多いさまざまな問題について、実際の画面を示しながら説明したものです。 + +Table view is not available with this format. + +このメッセージは、Selenium IDEの起動時に"テーブル"タブに表示されることがあります。 +回避策は、Selenium IDEを閉じて再度開くことです。 +詳細については、 [issue 1008](http://code.google.com/p/selenium/issues/detail?id=1008) を参照してください。 +これを確実に再現できる場合は、修正に取り組むことができるように詳細を提供してください。 ------------------ *error loading test case: no command found* -You've used **File=>Open** to try to open a test suite file. Use **File=>Open -Test Suite** instead. +「ファイル」メニューの「開く」を使用して、テストスイートファイルを開こうとしました。 +代わりに「ファイル」メニューの「テストスイートを開く」を使用してください。 -An enhancement request has been raised to improve this error message. See -[issue 1010](http://code.google.com/p/selenium/issues/detail?id=1010). +このエラーメッセージを改善するために、機能の拡張がリクエストされました。 +詳細は、[issue 1010](http://code.google.com/p/selenium/issues/detail?id=1010)を参照してください。 ------------------ ![Selenium IDE Trouble Timing](/images/legacy_docs/selenium_ide_trouble_timing.png) -This type of **error** may indicate a timing problem, i.e., the element -specified by a locator in your command wasn't fully loaded when the command -was executed. Try putting a **pause 5000** before the command to determine -whether the problem is indeed related to timing. If so, investigate using an -appropriate **waitFor\*** or **\*AndWait** command before the failing command. +このタイプの **エラー** は、タイミングの問題を示している可能性があります。 +つまり、コマンドのロケーターによって指定された要素が、コマンドの実行時に完全にロードされていません。 +コマンドの前に **pause 5000** を入れて、問題が本当にタイミングに関連しているかどうかを判断してください。 +その場合、失敗したコマンドの前に適切な **waitFor\*** または **\*AndWait** コマンドを使って調査してください。 ------------------ ![Selenium IDE Trouble Param](/images/legacy_docs/selenium_ide_trouble_param.png) -Whenever your attempt to use variable substitution fails as is the -case for the **open** command above, it indicates -that you haven't actually created the variable whose value you're -trying to access. This is -sometimes due to putting the variable in the **Value** field when it -should be in the **Target** field or vice versa. In the example above, -the two parameters for the **store** command have been erroneously -placed in the reverse order of what is required. -For any Selenese command, the first required parameter must go -in the **Target** field, and the second required parameter (if one exists) -must go in the **Value** field. +上記の **open** コマンドの場合のように変数置換を使用しようとして失敗した場合は、アクセスしようとしている値を持つ変数を実際に作成していないことを示します。 +これは、変数を **Target** フィールドに配置する必要がある場合に **Value** フィールドに配置するか、その逆の場合があります。 +上記の例では、storeコマンドの2つのパラメーターが、必要なものと逆の順序で誤って配置されています。 +Seleneseコマンドの場合、最初の必須パラメーターは **Target** フィールドに入力し、2番目の必須パラメーター(存在する場合)は **Value** フィールドに入力する必要があります。 ---------- @@ -1723,22 +1450,17 @@ must go in the **Value** field. "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: chrome://selenium-ide/content/file-utils.js :: anonymous :: line 48" data: no]* -One of the test cases in your test suite cannot be found. Make sure that the -test case is indeed located where the test suite indicates it is located. Also, -make sure that your actual test case files have the .html extension both in -their filenames, and in the test suite file where they are referenced. +テストスイートのテストケースの1つが見つかりません。 +テストケースが配置されていることを示すテストスイートが実際に配置されていることを確認してください。 +また、実際のテストケースファイルのファイル名と参照先のテストスイートファイルの両方に.html拡張子が付いていることを確認してください。 -An enhancement request has been raised to improve this error message. See -[issue 1011](http://code.google.com/p/selenium/issues/detail?id=1011). +このエラーメッセージを改善するために、機能の拡張がリクエストされました。 +詳細は、[issue 1011](http://code.google.com/p/selenium/issues/detail?id=1011)を参照してください。 ---------- ![Selenium IDE Trouble Extension](/images/legacy_docs/selenium_ide_trouble_extension.png) -Your extension file's contents have not been read by Selenium-IDE. Be -sure you have specified the proper pathname to the extensions file via -**Options=>Options=>General** in the **Selenium Core extensions** field. -Also, Selenium-IDE must be restarted after any change to either an -extensions file *or* to the contents of the **Selenium Core extensions** -field. - +拡張ファイルの内容が、Selenium-IDEによって読み取られていません。 +Selenium-IDE の *“オプション” メニューで “設定” をクリックし、 “一般” タブ* の **Selenium Core 拡張スクリプト (user-extension.js) のパス** フィールドに適切なパス名を指定していることを確認してください。 +また、 **Selenium Core 拡張スクリプト (user-extension.js) のパス** フィールドの内容を変更した後は、Selenium-IDEを再起動する必要があります。