これは、このセクションの複数ページの印刷可能なビューです。 印刷するには、ここをクリックしてください.

このページの通常のビューに戻る.

このドキュメントについて

これらのドキュメントは、コード自体と同様に、Seleniumコミュニティ内のボランティアによって100%維持されます。 当初から多くの人が使用してきましたが、多くの人が短期間しか使用しておらず、新しいユーザーのオンボーディングエクスペリエンスの改善に時間を割いてきました。

ドキュメントに問題がある場合、知りたいです! 問題を伝える最良の方法は、https://github.com/seleniumhq/seleniumhq.github.io/issuesにアクセスし、問題が既に報告されているかどうかを検索することです。 そうでない場合は、自由に開いてください!

コミュニティの多くのメンバーは、Libera.chat#selenium Liberaチャンネルに頻繁にアクセスします。 気軽に立ち寄って質問してください。 これらのドキュメントで役立つと思われるヘルプを受け取った場合は、必ず貢献を追加してください。 これらのドキュメントを更新することはできますが、通常のコミッター以外から投稿を受け取ると、誰にとってもずっと簡単になります。

1 - 著作権と帰属

Copyright, contributions and all attributions for the different projects under the Selenium umbrella.

Page being translated from English to Japanese. Do you speak Japanese? Help us to translate it by sending us pull requests!

Seleniumのドキュメント

このドキュメントをできるだけ完全かつ正確にするためにあらゆる努力が払われましたが、 保証または適合性は暗示されていません。 提供される情報は「現状のまま」です。 著者および出版社は、本書に含まれる情報から生じる損失または損害に関して、 いかなる個人または団体に対しても責任も責任も負わないものとします。 ここに含まれる情報の使用に関して、特許責任は一切負いません。

帰属

Thanks to:

Selenium メイン Repository

5302 commits
3352 commits
2478 commits
1494 commits
1464 commits
1299 commits
1222 commits
1189 commits
1175 commits
1162 commits
617 commits
599 commits
473 commits
472 commits
326 commits
289 commits
248 commits
225 commits
205 commits
203 commits
200 commits
191 commits
189 commits
179 commits
143 commits
138 commits
137 commits
133 commits
115 commits
109 commits
108 commits
99 commits
94 commits
90 commits
83 commits
66 commits
66 commits
63 commits
49 commits
48 commits
46 commits
44 commits
42 commits
42 commits
41 commits
40 commits
36 commits
32 commits
30 commits
29 commits
28 commits
27 commits
25 commits
22 commits
20 commits
20 commits
20 commits
19 commits
16 commits
15 commits
14 commits
14 commits
12 commits
12 commits
12 commits
12 commits
12 commits
11 commits
10 commits
10 commits
9 commits
9 commits
9 commits
9 commits
9 commits
8 commits
8 commits
8 commits
8 commits
7 commits
7 commits
7 commits
7 commits
7 commits
7 commits
7 commits
6 commits
6 commits
6 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits

Selenium IDE

2445 commits
374 commits
88 commits
57 commits
51 commits
36 commits
34 commits
28 commits
27 commits
15 commits
15 commits
12 commits
12 commits
7 commits
6 commits
3 commits
3 commits
3 commits
3 commits
3 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits

Docker Selenium

537 commits
155 commits
142 commits
134 commits
53 commits
50 commits
42 commits
24 commits
17 commits
15 commits
12 commits
8 commits
7 commits
7 commits
5 commits
5 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits

Selenium Website & Docs

729 commits
696 commits
323 commits
230 commits
104 commits
67 commits
47 commits
45 commits
35 commits
32 commits
28 commits
25 commits
21 commits
20 commits
20 commits
19 commits
18 commits
17 commits
15 commits
13 commits
12 commits
10 commits
8 commits
7 commits
7 commits
7 commits
6 commits
6 commits
6 commits
6 commits
6 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
4 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
3 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits

Previous Selenium Website

417 commits
87 commits
79 commits
63 commits
59 commits
40 commits
40 commits
36 commits
26 commits
24 commits
22 commits
21 commits
21 commits
19 commits
17 commits
14 commits
12 commits
11 commits
11 commits
10 commits
7 commits
6 commits
5 commits
5 commits
5 commits
5 commits
5 commits
5 commits
3 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits

Previous Documentation Rewrite Project

197 commits
105 commits
54 commits
30 commits
27 commits
25 commits
21 commits
17 commits
16 commits
12 commits
12 commits
12 commits
12 commits
8 commits
7 commits
6 commits
6 commits
6 commits
6 commits
5 commits
5 commits
4 commits
4 commits
4 commits
4 commits
3 commits
3 commits
3 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
2 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits
1 commits

Seleniumドキュメントプロジェクトで使用されるサードパーティソフトウェア

SoftwareVersionLicense
Hugov0.110.0Apache 2.0
DocsyApache 2.0

ライセンス

Seleniumプロジェクトから作成されたすべてのコードとドキュメントは、 Apache 2.0ライセンスに基づいてライセンスされており、 Software Freedom Conservancy に著作権があります。

ライセンスは便宜上ここに含まれていますが、 Apache FoundationのWebサイトでも見つけることができます。

                                 Apache License
                           Version 2.0, 2004年1月
                        http://www.apache.org/licenses/

   使用、複製、および頒布に関する条項

   1. 定義  

      「ライセンス」とは、このドキュメントの第1項から第9項までで定義している、
      使用、複製、および頒布に関する条項を指します。

      「ライセンサー」とは、著作権所有者、あるいは著作権所有者が
      ライセンス付与対象として認めた者を指します。

      「法人」とは、行為者と、行為者を管理するか行為者により管理されるか
      行為者共通の管理下にある他のすべての者とから成る連合体を指します。
      この定義における「管理」とは、
      (i) 契約またはその他により、直接または間接的にこの法人の指揮・経営を行う権限、または
      (ii) この法人の50%以上の株式の所有権 または
      (iii) 受益所有権を有することを指します。

      「あなた」とは、本ライセンスにより付与される権利を行使する個人または法人を指します。

      「ソース」形式とは、ソフトウェアのソースコード、ドキュメントソース、
      設定ファイルといった、変更を加えるのに好都合な形式を指します。

      「オブジェクト」形式とは、コンパイルされたオブジェクトコード、生成されたドキュメント、
      他のメディアへの変換物といった、ソース形式の機械的な変換により生じる形式を指します。

      「成果物」とは、ソース形式であるとオブジェクト形式であるとを問わず、
      製作物に挿入または添付される(後出の付録に例がある)著作権表示で示された著作物で、
      本ライセンスに基づいて利用が許されるものを指します。

      「派生成果物」とは、編集上の改訂、注解、推敲など、
      成果物を基にしていて全体としてオリジナル著作物と呼べるような製作物全般を指します。
      本ライセンスでは、成果物や派生成果物から分離できる製作物や、
      成果物や派生成果物のインタフェースへの単なるリンク(または名前によるバインド)を、
      派生成果物に含めません。

      「コントリビューション」とは、成果物のオリジナルバージョンならびに成果物
      または派生成果物への変更や追加も含めて、著作権所有者あるいは著作権所有者が認めた
      個人または法人による成果物への組み込みを意図してライセンサーに提出される
      著作物全般を指します。
      この定義における「提出」とは、成果物を論じたり改良するためにライセンサー
      またはその代理者により管理される電子的メーリングリスト、ソースコード管理システム、
      問題追跡システムといった、電子的方法、口頭、または書面で、
      ライセンサーまたはその代理者に情報を送ることを指します。
      ただし、著作権所有者が書面で「コントリビューションでない」と明示したものは除きます。

      「コントリビューター」とは、ライセンサーおよびその代理を務める個人または法人で、
      自分のコントリビューションがライセンサーに受領されて成果物に組み込まれた者を指します。

   2. 著作権ライセンスの付与  
      本ライセンスの条項に従って、各コントリビューターはあなたに対し、
      ソース形式であれオブジェクト形式であれ、成果物および派生成果物を複製したり、
      派生成果物を作成したり、公に表示したり、公に実行したり、サブライセンスしたり、
      頒布したりする、無期限で世界規模で非独占的で使用料無料で取り消し不能な
      著作権ライセンスを付与します。

   3. 特許ライセンスの付与  
      本ライセンスの条項に従って、各コントリビューターはあなたに対し、
      成果物を作成したり、使用したり、販売したり、販売用に提供したり、
      インポートしたり、その他の方法で移転したりする、
      無期限で世界規模で非独占的で使用料無料で取り消し不能な
      (この項で明記したものは除く)特許ライセンスを付与します。
      ただし、このようなライセンスは、コントリビューターによって
      ライセンス可能な特許申請のうち、当該コントリビューターのコントリビューションを
      単独または該当する成果物と組み合わせて用いることで必然的に侵害されるものにのみ
      適用されます。
      あなたが誰かに対し、交差請求や反訴を含めて、
      成果物あるいは成果物に組み込まれたコントリビューションが
      直接または間接的な特許侵害に当たるとして特許訴訟を起こした場合、
      本ライセンスに基づいてあなたに付与された特許ライセンスは、
      そうした訴訟が正式に起こされた時点で終了するものとします。

   4. 再頒布  
      あなたは、ソース形式であれオブジェクト形式であれ、変更の有無に関わらず、
      以下の条件をすべて満たす限りにおいて、成果物またはその派生成果物のコピーを
      複製したり頒布したりすることができます。

      (a) 成果物または派生成果物の他の受領者に本ライセンスのコピーも渡すこと。

      (b) 変更を加えたファイルについては、あなたが変更したということが
      よくわかるような告知を入れること。

      (c) ソース形式の派生成果物を頒布する場合は、ソース形式の成果物に含まれている著作権、
      特許、商標、および帰属についての告知を、派生成果物のどこにも関係しないものは除いて、
      すべて派生成果物に入れること。

      (d) 成果物の一部として「NOTICE」に相当するテキストファイルが含まれている場合は、
      そうしたNOTICEファイルに含まれている帰属告知のコピーを、
      派生成果物のどこにも関係しないものは除いて、頒布する派生成果物に入れること。
      その際、次のうちの少なくとも1箇所に挿入すること。
      (i) 派生成果物の一部として頒布するNOTICEテキストファイル、
      (ii) ソース形式またはドキュメント(派生成果物と共にドキュメントを頒布する場合)、
      (iii) 派生成果物によって生成される表示
      (こうした第三者告知を盛り込むことが標準的なやり方になっている場合)。
      NOTICEファイルの内容はあくまで情報伝達用であって、
      本ライセンスを修正するものであってはなりません。
      あなたは頒布する派生成果物に自分の帰属告知を
      (成果物からのNOTICEテキストに並べて、またはその付録として)追加できますが、
      これはそうした追加の帰属告知が本ライセンスの修正と
      解釈されるおそれがない場合に限られます。

      あなたは自分の修正物に自らの著作権表示を追加することができ、
      自分の修正物の使用、複製、または頒布について、あるいはそうした派生成果物の全体について、
      付加的なライセンス条項または異なるライセンス条項を設けることができます。
      ただし、これは成果物についてのあなたの使用、複製、および頒布が、
      それ以外の点で本ライセンスの条項に従っている場合に限られます。

   5. コントリビューションの提出  
      特に断りがない限り、あなたが成果物への組み込みを意図してライセンサーに
      提出したコントリビューションは、付加的な条項がなければ、
      本ライセンスの条項に従うものとします。
      上述の規定にかかわらず、そうしたコントリビューションに関してあなたがライセンサーと
      結んだかもしれない別のライセンス契約の条項を、ここで無効にしたり
      修正したりすることはありません。

   6. 商標  
      本ライセンスでは、成果物の出所を記述したりNOTICEファイルの内容を複製するときに
      必要になる妥当で慣習的な使い方は別として、ライセンサーの商号、商標、サービスマーク、
      または製品名の使用権を付与しません。

   7. 保証の否認  
      適用される法律または書面での同意によって命じられない限り、
      ライセンサーは成果物を(そしてコントリビューターは各自のコントリビューションを)
      「現状のまま」提供するものとし、明示黙示を問わず、タイトル、非侵害性、
      商業的な使用可能性、および特定の目的に対する適合性を含め、
      いかなる保証も条件も提供しません。
      あなたは成果物の使用や再頒布の適切性を自分で判断する責任を持つと共に、
      本ライセンスにより付与される権利を行使することに伴うすべてのリスクを負うことになります。

   8. 責任の制限  
      いかなる条件および法理論においても、不法行為(過失を含む)、契約、
      またはその他いかなる場合でも、適用される法律または書面での同意によって命じられない限り、
      コントリビューターは本ライセンスまたは成果物の使い方に関連して生じる直接損害、
      間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害を含め、
      営業権の損失、業務の停止、コンピューター障害または誤作動、
      その他の商業上の損害や損失など、いかなる損害に対しても、
      たとえそうした損害の可能性をたとえ知らされていたとしても、
      あなたに責任を負わないものとします。

   9. 保証または追加的責任の引き受け  
      成果物またはその派生成果物を再頒布する際、あなたはサポート、保証、損害補償、
      またはその他の責任や、本ライセンスに矛盾しない権利を提示し、
      これを有料にすることができます。
      ただし、そうした責任を引き受ける場合、あなたはそれを自分自身のためにだけ
      自己責任として行えるのであって、他のコントリビューターのために行うことはできません。
      また、あなたはそうした保証や追加的責任のせいで他のコントリビューターに
      責任が降りかかったり賠償要求が出されたとしても、それらのコントリビューターに
      損害が及ぶのを防ぐと共に各コントリビューターの損害を補償することに同意しなければなりません。

   使用、複製、および頒布に関する条項の終わり

   付録: Apache Licenseの適用の仕方

      あなたの製作物にApache Licenseを適用するときは、次の定型文を添付してください。
      ただし、"[]"で囲まれている部分は、あなた自身の識別情報に置き換えてください
      (その際、角括弧は取り除きます)。
      また、この文言を該当するファイル形式に合ったコメント構文で囲んでください。
      さらに、第三者アーカイブ内での識別を容易にするため、
      ファイル名またはクラス名ならびに趣旨説明が著作権表示と同じ「印刷ページ」に
      現れるようにすることをお勧めします。

   Copyright [yyyy] [著作権所有者の名前]

   Apache License Version 2.0(「本ライセンス」)に基づいてライセンスされます。
   あなたがこのファイルを使用するためには、本ライセンスに従わなければなりません。
   本ライセンスのコピーは下記の場所から入手できます。

       http://www.apache.org/licenses/LICENSE-2.0

   適用される法律または書面での同意によって命じられない限り、
   本ライセンスに基づいて頒布されるソフトウェアは、明示黙示を問わず、
   いかなる保証も条件もなしに「現状のまま」頒布されます。
   本ライセンスでの権利と制限を規定した文言については、本ライセンスを参照してください。

2 - Seleniumのサイトとドキュメントに貢献する

Information on improving documentation and code examples for Selenium

Page being translated from English to Japanese. Do you speak Japanese? Help us to translate it by sending us pull requests!

Seleniumは大きなソフトウェアプロジェクトであり、そのサイトとドキュメントは、物事の仕組みを理解し、その可能性を活用する効果的な方法を学ぶための鍵となります。

このプロジェクトには、Seleniumのサイトとドキュメントの両方が含まれています。これは、Seleniumを効果的に使用する方法、Seleniumに参加する方法、およびSeleniumに貢献する方法に関する最新情報を提供するための継続的な取り組みです(特定のリリースを対象としていません)。

サイトおよびドキュメントへの貢献は、以下のセクションで説明されているプロセスに従います。


Seleniumプロジェクトは、皆様からのコントリビューションを歓迎します。 お手伝いをいただくには、いくつかの方法があります:

イシュー報告

新しい問題を報告したり、既存の問題についてコメントしたりするときは、議論がSeleniumソフトウェア、そのサイトおよび/またはドキュメントに関する具体的な技術問題に関連していることを確認してください。

Seleniumのすべてのコンポーネントは、時間の経過とともに非常に速く変化するため、ドキュメントが古くなる可能性があります。 このようなケースを見つけた場合には、遠慮なくイシューを作成してください。 また、ドキュメントを最新の状態に更新する方法をご存知でしたら、関連する変更を含むプルリクエストを送ってしてください。

見つかったものが問題であるかどうかわからない場合、https://selenium.dev/supportに記載されているコミュニケーション手段にて質問してください。

What to Help With

Creating Examples

Examples that need to be moved are marked with:

Add Example

We want to be able to run all of our code examples in the CI to ensure that people can copy and paste and execute everything on the site. So we put the code where it belongs in the examples directory. Each page in the documentation correlates to a test file in each of the languages, and should follow naming conventions. For instance examples for this page https://www.selenium.dev/documentation/webdriver/browsers/chrome/ get added in these files:

  • "/examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java"
  • "/examples/python/tests/browsers/test_chrome.py"
  • "/examples/dotnet/SeleniumDocs/Browsers/ChromeTest.cs"
  • "/examples/ruby/spec/browsers/chrome_spec.rb"
  • "/examples/javascript/test/browser/chromeSpecificCaps.spec.js"

Each example should get its own test. Ideally each test has an assertion that verifies the code works as intended. Once the code is copied to its own test in the proper file, it needs to be referenced in the markdown file.

For example, the tab in Ruby would look like this:

    {{< tab header="Ruby" >}}
    {{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L8-L9" >}}
    {{< /tab >}}

The line numbers at the end represent only the line or lines of code that actually represent the item being displayed. If a user wants more context, they can click the link to the GitHub page that will show the full context.

Make sure that if you add a test to the page that all the other line numbers in the markdown file are still correct. Adding a test at the top of a page means updating every single reference in the documentation that has a line number for that file.

Finally, make sure that the tests pass in the CI.

Moving Examples

Examples that need to be moved are marked with:

Move Code

Everything from the Creating Examples section applies, with one addition.

Make sure the tab includes text=true. By default, the tabs get formatted for code, so to use markdown or other shortcode statements (like gh-codeblock) it needs to be declared as text. For most examples, the tabpane declares the text=true, but if some of the tabs have code examples, the tabpane cannot specify it, and it must be specified in the tabs that do not need automatic code formatting.

貢献

Seleniumプロジェクトは新しいコントリビュータを歓迎します。目立った価値ある貢献を継続的に行った個人は コミッター として認められ、プロジェクトへのコミットアクセス件が与えられます。

本ガイドでは、貢献のプロセスについて説明します。

ステップ 1: フォーク

GitHub上のプロジェクトをフォークし、コピーをローカルにチェックアウトしてください。

% git clone git@github.com:seleniumhq/seleniumhq.github.io.git
% cd seleniumhq.github.io

依存関係: Hugo

We use Hugo and the Docsy theme to build and render the site. You will need the “extended” Sass/SCSS version of the Hugo binary to work on this site. We recommend to use Hugo 0.110.0 or higher.

Please follow the Install Hugo instructions from Docsy.

ステップ 2: ブランチの作成

フィーチャーブランチを作成し、ハックを開始します。:

% git checkout -b my-feature-branch

我々はHEADベースの開発を行っています。つまり、全ての変更はtrunkブランチ上に直接適用されます。

ステップ 3: 変更を加える

The repository contains the site and docs. Before jumping into making changes, please initialize the submodules and install the needed dependencies (see commands below). To make changes to the site, work on the website_and_docs directory. To see a live preview of your changes, run hugo server on the site’s root directory.

% git submodule update --init --recursive
% cd website_and_docs
% hugo server

See Style Guide for more information on our conventions for contribution

ステップ 4: コミット

まず、gitがあなたの名前とメールアドレスを知っていることを確認してください:

% git config --global user.name 'Santa Claus'
% git config --global user.email 'santa@example.com'

**適切なコミットメッセージを書くことは重要です。**コミットメッセージには、変更された内容、理由、修正されたイシューへの参照(ある場合)を記述する必要があります。作成するときは、次のガイドラインに従ってください。:

  1. 最初の行は約50文字以下で、変更の簡単な説明を含める必要があります。
  2. 2行目は空白のままにします。
  3. 他のすべての行を72列で折り返します。
  4. Fixes #Nを含めてください。ここでは N がこのコミットで修正したイシュー番号です(存在する場合)。

適切なコミットメッセージは次のようになります:

explain commit normatively in one line

Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc.

The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
72 characters or so. That way `git log` will show things
nicely even when it is indented.

Fixes #141

最初の行はgit shortloggit log --onelineを実行した際に他人が最初に目にするため、意味のあるものでなければなりません。

ステップ 5: リベース

あなたの作業を同期するため、(git mergeではなく)git rebaseを時々実行してください。

% git fetch origin
% git rebase origin/trunk

ステップ 6: テスト

あなたの変更が何も問題を起こしていないことを確認するため、常に忘れずにローカルサーバーの実行を行ってください。

ステップ 7: プッシュ

% git push origin my-feature-branch

https://github.com/yourusername/seleniumhq.github.io.git を開き、_Pull Request_を押し、フォームを入力してください。 CLAに署名したことを示してください (ステップ7を参照)

プルリクエストは通常数日以内にレビューされます。対応すべきコメントがある場合は、新しく(できれば fixupsで)コミットし、同じブランチにプッシュしてください。

ステップ 8: 統合

コードレビューが完了すると、コミッターがPRを取得し、リポジトリのtrunkブランチに統合します。 マスターブランチで履歴を線形に保持するのが好きなので、通常はブランチの履歴をスカッシュしてリベースします。

コミュニケーション

プロジェクトのコントリビューターおよびコミュニティ全体と交流する方法については、全て https://selenium.dev/support で詳細が記載されています。

3 - Style guide for Selenium documentation

Conventions for contributions to the Selenium documentation and code examples

Read our contributing documentation for complete instructions on how to add content to this documentation.

Alerts

Alerts have been added to direct potential contributors to where specific content is missing.

{{< alert-content />}}

or

{{< alert-content >}}
Additional information about what specific content is needed
{{< /alert-content >}}

Which gets displayed like this:

Capitalization of titles

Our documentation uses Title Capitalization for linkTitle which should be short and Sentence capitalization for title which can be longer and more descriptive. For example, a linkTitle of Special Heading might have a title of The importance of a special heading in documentation

Line length

When editing the documentation’s source, which is written in plain HTML, limit your line lengths to around 100 characters.

Some of us take this one step further and use what is called semantic linefeeds, which is a technique whereby the HTML source lines, which are not read by the public, are split at ‘natural breaks’ in the prose. In other words, sentences are split at natural breaks between clauses. Instead of fussing with the lines of each paragraph so that they all end near the right margin, linefeeds can be added anywhere that there is a break between ideas.

This can make diffs very easy to read when collaborating through git, but it is not something we enforce contributors to use.

Translations

Selenium now has official translators for each of the supported languages.

  • If you add a code example to the important_documentation.en.md file, also add it to important_documentation.ja.md, important_documentation.pt-br.md, important_documentation.zh-cn.md.
  • If you make text changes in the English version, just make a Pull Request. The new process is for issues to be created and tagged as needs translation based on changes made in a given PR.

Code examples

All references to code should be language independent, and the code itself should be placed inside code tabs.

Default Code Tabs

The Docsy code tabs look like this:

    WebDriver driver = new ChromeDriver();
  
    driver = webdriver.Chrome()
  
    var driver = new ChromeDriver();
  
    driver = Selenium::WebDriver.for :chrome
  
    let driver = await new Builder().forBrowser('chrome').build();
  
    val driver = ChromeDriver()
  

To generate the above tabs, this is what you need to write. Note that the tabpane includes langEqualsHeader=true. This auto-formats the code in each tab to match the header name, and ensures that all tabs on the page with a language are set to the same thing.

{{< tabpane langEqualsHeader=true >}}
  {{< tab header="Java" >}}
    WebDriver driver = new ChromeDriver();
  {{< /tab >}}
  {{< tab header="Python" >}}
    driver = webdriver.Chrome()
  {{< /tab >}}
  {{< tab header="CSharp" >}}
    var driver = new ChromeDriver();
  {{< /tab >}}
  {{< tab header="Ruby" >}}
    driver = Selenium::WebDriver.for :chrome
  {{< /tab >}}
  {{< tab header="JavaScript" >}}
    let driver = await new Builder().forBrowser('chrome').build();
  {{< /tab >}}
  {{< tab header="Kotlin" >}}
    val driver = ChromeDriver()
  {{< /tab >}}
{{< /tabpane >}}

Reference GitHub Examples

To ensure that all code is kept up to date, our goal is to write the code in the repo where it can be executed when Selenium versions are updated to ensure that everything is correct.

All code examples to be in our example directories.

This code can be automatically displayed in the documentation using the gh-codeblock shortcode. The shortcode automatically generates its own html, so we do not want it to auto-format with the language header. If all tabs are using this shortcode, set text=true in the tabpane and remove langEqualsHeader=true. If only some tabs are using this shortcode, keep langEqualsHeader=true in the tabpane and add text=true to the tab. Note that the gh-codeblock line can not be indented at all.

One great thing about using gh-codeblock is that it adds a link to the full example. This means you don’t have to include any additional context code, just the line(s) that are needed, and the user can navigate to the repo to see how to use it.

A basic comparison of code looks like:

{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L46-L47" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/tests/getting_started/first_script.py#L17-L18" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/GettingStarted/FirstScript.cs#L39-L40" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< gh-codeblock path="examples/ruby/spec/getting_started/first_script.rb#L16-L17" >}}
{{< /tab >}}
{{< tab header="JavaScript" >}}
{{< gh-codeblock path="examples/javascript/test/getting_started/firstScript.spec.js#L23-L24" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
{{< gh-codeblock path="examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt#L25-L26" >}}
{{< /tab >}}
{{< /tabpane >}}

Which looks like this:


message = driver.find_element(by=By.ID, value="message")

message = driver.find_element(id: 'message')
    let value = await message.getText();
    assert.equal("Received!", value);
        var textBox = driver.findElement(By.name("my-text"))
        val submitButton = driver.findElement(By.cssSelector("button"))

Using Markdown in a Tab

If you want your example to include something other than code (default) or html (from gh-codeblock), you need to first set text=true, then change the Hugo syntax for the tabto use % instead of < and > with curly braces:

{{< tabpane text=true >}}
{{% tab header="Java" %}}
1. Start the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L12" >}}
2. Navigate to a page
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L14" >}}
3. Quit the driver
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >}}
{{% /tab %}}
< ... >
{{< /tabpane >}}

This produces:

  1. Start the driver
        WebDriver driver = new ChromeDriver();
  1. Navigate to a page
        driver.get("https://www.selenium.dev/selenium/web/web-form.html");
  1. Quit the driver
        driver.quit();

This is preferred to writing code comments because those will not be translated. Only include the code that is needed for the documentation, and avoid over-explaining. Finally, remember not to indent plain text or it will rendered as a codeblock.