Skip to content

Add Japanese translation of "Support packages" #232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions docs_source_files/content/support_packages/_index.ja.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
---
title: "Support packages"
title: "サポートパッケージ"
chapter: true
weight: 11
---

{{% notice info %}}
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
{{% /notice %}}

# Support packages
# サポートパッケージ
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
title: "Browser navigation"
title: "ブラウザナビゲーション"
weight: 1
---

{{% notice info %}}
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
{{% /notice %}}

There are commands for various webpage loading actions:
さまざまなWebページの読み込みアクション用のコマンドがあります。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ title: "マウスアクションの詳細"
weight: 4
---

{{% notice info %}}
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
{{% /notice %}}

Mouse represents a mouse event. Mouse actions are performed
by using low-level interface which allows us to
provide virtualized device input action to the web browser.
マウスは、マウスイベントを表します。
マウスアクションは低レベルインターフェイスを使用して実行され、仮想化されたデバイス入力アクションをWebブラウザーに提供できます。

## clickAndHold
## クリックとホールド

It will move to the element and clicks (without releasing) in the middle of the given element.
要素に移動し、指定された要素の中央で(解放せずに)クリックします。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -141,8 +136,8 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## contextClick
This method firstly performs a mouse-move to the location of the element and performs the context-click (right click) on the given element.
## コンテキストクリック(右クリック)
このメソッドは、最初に要素の位置へのマウス移動を実行し、指定された要素でコンテキストクリック(右クリック)を実行します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -269,8 +264,8 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## doubleClick
It will move to the element and performs a double-click in the middle of the given element.
## ダブルクリック
要素に移動し、指定された要素の中央でダブルクリックを実行します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -397,8 +392,9 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## moveToElement
This method moves the mouse to the middle of the element. The element is also scrolled into the view on performing this action.
## 要素への移動
このメソッドは、マウスを要素の中央に移動します。
このアクションを実行すると、要素もビューにスクロールされます。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -525,9 +521,10 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## moveByOffset:
## オフセットによる移動

This method moves the mouse from its current position (or 0,0) by the given offset. If the coordinates are outside the view window, then the mouse will end up outside the browser window.
このメソッドは、マウスを現在の位置(または0,0)から指定したオフセットだけ移動します。
座標がビューウィンドウの外側にある場合、マウスはブラウザウィンドウの外側になります。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -672,10 +669,9 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## dragAndDrop
## ドラッグアンドドロップ

This method firstly performs a click-and-hold on the source element,
moves to the location of the target element and then releases the mouse.
このメソッドは、最初にソース要素でクリックアンドホールドを実行し、ターゲット要素の位置に移動してからマウスを離します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -812,9 +808,9 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## dragAndDropBy
## オフセット分のドラッグアンドドロップ

This method firstly performs a click-and-hold on the source element, moves to the given offset and then releases the mouse.
このメソッドは、まずソース要素でクリックアンドホールドを実行し、指定されたオフセットに移動してからマウスを離します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -965,10 +961,10 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## release
## リリース

This action releases the depressed left mouse button. If WebElement is passed,
it will release depressed left mouse button on the given WebElement
このアクションは、押し下げられたマウスの左ボタンをリリースします。
WebElementが渡されると、指定されたWebElementでマウスの左ボタンが押された状態でリリースされます。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
---
title: "Working with colours"
title: "色を扱う"
weight: 2
---

{{% notice info %}}
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
{{% /notice %}}

You will occasionally want to validate the colour of something as part of your tests;
the problem is that colour definitions on the web are not constant.
Would it not be nice if there was an easy way to compare
a HEX representation of a colour with a RGB representation of a colour,
or a RGBA representation of a colour with a HSLA representation of a colour?
テストの一部として何かの色を検証したい場合があります。
問題は、ウェブ上の色の定義が一定ではないことです。
色のHEX表現を色のRGB表現と比較する簡単な方法、または色のRGBA表現を色のHSLA表現と比較する簡単な方法があったらいいのではないでしょうか?

Worry not. There is a solution: the _Color_ class!
心配しないでください。解決策があります。: _Color_ クラスです!

First of all, you will need to import the class:
まず、クラスをインポートする必要があります。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand All @@ -37,10 +31,9 @@ include Selenium::WebDriver::Support
{{< code-panel language="kotlin" >}}import org.openqa.selenium.support.Color{{< / code-panel >}}
{{< / code-tab >}}

You can now start creating colour objects.
Every colour object will need to be created from a string representation of
your colour.
Supported colour representations are:
これで、カラーオブジェクトの作成を開始できます。
すべての色オブジェクトは、色の文字列表現から作成する必要があります。
サポートされている色表現は、以下のとおりです。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -87,9 +80,7 @@ private val HSLA_COLOUR = Color.fromString("hsla(100, 0%, 50%, 0.5)")
{{< / code-panel >}}
{{< / code-tab >}}

The Color class also supports all of the base colour definitions
specified in
[http://www.w3.org/TR/css3-color/#html4](//www.w3.org/TR/css3-color/#html4).
Colorクラスは、 [http://www.w3.org/TR/css3-color/#html4](//www.w3.org/TR/css3-color/#html4) で指定されているすべての基本色定義もサポートしています。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -120,9 +111,8 @@ private val HOTPINK = Color.fromString("hotpink")
{{< / code-panel >}}
{{< / code-tab >}}

Sometimes browsers will return a colour value of "transparent"
if no colour has been set on an element.
The Color class also supports this:
要素に色が設定されていない場合、ブラウザは "透明" の色の値を返すことがあります。
Colorクラスもこれをサポートしています。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand All @@ -145,10 +135,7 @@ private val TRANSPARENT = Color.fromString("transparent")
{{< / code-panel >}}
{{< / code-tab >}}

You can now safely query an element
to get its colour/background colour knowing that
any response will be correctly parsed
and converted into a valid Color object:
レスポンスが正しく解析され、有効なColorオブジェクトに変換されることを認識して、要素を安全にクエリしてその色/背景色を取得できるようになりました。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand All @@ -175,8 +162,7 @@ val loginButtonBackgroundColour = driver.findElement(By.id("login")).getCssValue
{{< / code-panel >}}
{{< / code-tab >}}

You can then directly compare colour objects:

そして、色オブジェクトを直接比較できます。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand All @@ -199,8 +185,7 @@ assert(loginButtonBackgroundColour.equals(HOTPINK))
{{< / code-panel >}}
{{< / code-tab >}}

Or you can convert the colour into one of the following formats
and perform a static validation:
または、色を次の形式のいずれかに変換し、静的に検証することができます。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -231,4 +216,4 @@ assert(loginButtonBackgroundColour.asRgb().equals("rgb(255, 105, 180)"))
{{< / code-panel >}}
{{< / code-tab >}}

Colours are no longer a problem.
色はもはや問題ではありません。
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
---
title: "Working with cookies"
title: "クッキーの使用"
weight: 6
---

{{% notice info %}}
<i class="fas fa-language"></i> Page being translated from
English to Japanese. Do you speak Japanese? Help us to translate
it by sending us pull requests!
{{% /notice %}}

A cookie is a small piece of data that is sent from a website and stored in your computer.
Cookies are mostly used to recognise the user and load the stored information.
Cookieは、Webサイトから送信され、コンピューターに保存される小さなデータです。
Cookieは、主にユーザーを認識し、保存されている情報を読み込むために使用されます。

WebDriver API provides a way to interact with cookies with built-in methods:
WebDriver APIは、組み込みメソッドでCookieと対話するメソッドを提供します。

## Add Cookie
It is used to add a cookie to the current browsing context.
Add Cookie only accepts a set of defined serializable JSON object. <a href="https://www.w3.org/TR/webdriver1/#cookies"> Here </a>
is the link to the list of accepted JSON key values
## クッキーの追加
現在のブラウジングコンテキストにCookieを追加するために使用されます。
Cookieの追加では、一連の定義済みのシリアル化可能なJSONオブジェクトのみを受け入れます。
受け入れられたJSONキー値のリストへのリンクは<a href="https://www.w3.org/TR/webdriver1/#cookies">こちら</a>にあります。

First of all, you need to be on the domain that the cookie will be
valid for. If you are trying to preset cookies before
you start interacting with a site and your homepage is large / takes a while to load
an alternative is to find a smaller page on the site (typically the 404 page is small,
e.g. http://example.com/some404page)
まず、Cookieが有効になるドメインにいる必要があります。
サイトとの対話を開始する前にCookieを事前設定しようとしていて、ホームページが大きい場合/代替の読み込みに時間がかかる場合は、サイトで小さいページを見つけることです。(通常、たとえば http://example.com/some404page のような、404ページは小さいです。)

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -119,9 +111,9 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## Get Named Cookie
## 命名されたクッキーの取得

It returns the serialized cookie data matching with the cookie name among all associated cookies.
関連付けられているすべてのCookieの中で、Cookie名と一致するシリアル化されたCookieデータを返します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -233,10 +225,10 @@ fun main() {
{{< / code-panel >}}
{{< / code-tab >}}

## Get All Cookies
## 全てのクッキーの取得

It returns a ‘successful serialized cookie data’ for current browsing context.
If browser is no longer available it returns error.
現在のブラウジングコンテキストの '成功したシリアル化されたCookieデータ' を返します。
ブラウザが使用できなくなった場合、エラーが返されます。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -355,9 +347,9 @@ fun main() {
{{< / code-tab >}}


## Delete Cookie
## クッキーの削除

It deletes the cookie data matching with the provided cookie name.
指定されたCookie名と一致するCookieデータを削除します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down Expand Up @@ -489,9 +481,9 @@ fun main() {
{{< / code-tab >}}


## Delete All Cookies
## 全てのクッキーの削除

It deletes all the cookies of the current browsing context.
現在のブラウジングコンテキストの全てのCookieを削除します。

{{< code-tab >}}
{{< code-panel language="java" >}}
Expand Down
Loading