From fff1e7b06e648866b8f99a09546400efffbe2a22 Mon Sep 17 00:00:00 2001 From: Harshit Bhardwaj Date: Thu, 17 Oct 2024 19:33:16 +0530 Subject: [PATCH] Local driver examples added (Creating Sessions) Added the local driver examples under Creating Sessions section of drivers page for Java, CSharp and JS. Have verified the fixes locally. --- .../documentation/webdriver/drivers/_index.en.md | 15 ++++++++------- .../documentation/webdriver/drivers/_index.ja.md | 11 +++++------ .../webdriver/drivers/_index.pt-br.md | 15 ++++++++------- .../webdriver/drivers/_index.zh-cn.md | 9 ++++----- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md index 790b4b679225..76c57d86ebec 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.en.md @@ -14,7 +14,8 @@ The session is created automatically by initializing a new Driver class object. Each language allows a session to be created with arguments from one of these classes (or equivalent): -* [Options]({{< ref "options.md" >}}) to describe the kind of session you want; default values are used for local, but this is required for remote +* [Options]({{< ref "options.md" >}}) to describe the kind of session you want; default values are used for local, but + this is required for remote * Some form of [HTTP Client configuration]({{< ref "http_client.md" >}}) (the implementation varies between languages) * [Listeners]({{< ref "listeners.md" >}}) @@ -23,23 +24,24 @@ Each language allows a session to be created with arguments from one of these cl The primary unique argument for starting a local driver includes information about starting the required driver service on the local machine. -* [Service]({{< ref "service.md" >}}) object applies only to local drivers and provides information about the browser driver +* [Service]({{< ref "service.md" >}}) object applies only to local drivers and provides information about the browser + driver {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/drivers/service.spec.js#L32-L36" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -51,12 +53,11 @@ on the local machine. The primary unique argument for starting a remote driver includes information about where to execute the code. Read the details in the [Remote Driver Section]({{< ref "remote_webdriver.md" >}}) - ## Quitting Sessions Quitting a session corresponds to W3C command for [Deleting a Session](https://w3c.github.io/webdriver/#delete-session). -Important note: the `quit` method is different from the `close` method, +Important note: the `quit` method is different from the `close` method, and it is recommended to always use `quit` to end the session {{< tabpane text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md index 2b61551f1a69..edd58015b790 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.ja.md @@ -14,32 +14,31 @@ weight: 3 各言語では、次のいずれかのクラス (または同等のもの) の引数を使用してセッションを作成することができます。 -* [オプション]({{< ref "options.md" >}}) 作成を希望するセッションの種類 ; ローカルにはデフォルト値を使用しますが、リモートには必須です。 +* [オプション]({{< ref "options.md" >}}) 作成を希望するセッションの種類 ; ローカルにはデフォルト値を使用しますが、リモートには必須です。 * 何らかの形の[HTTP Client configuration]({{< ref "http_client.md" >}}) (実装は言語によって異なります) * [リスナー]({{< ref "listeners.md" >}}) - + ### ローカルドライバー ローカルドライバーを起動するための主な一意の引数には、ローカルコンピューターで必要なドライバーサービスを起動するための情報が含まれます。 - * [Service]({{< ref "service.md" >}})オブジェクトはローカルドライバーにのみ適用され、ブラウザーのドライバーに関する情報を提供します。 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/drivers/service.spec.js#L32-L36" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md index ac00ae8d6fdf..fde37e8b8b23 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.pt-br.md @@ -14,7 +14,8 @@ The session is created automatically by initializing a new Driver class object. Each language allows a session to be created with arguments from one of these classes (or equivalent): -* [Options]({{< ref "options.md" >}}) to describe the kind of session you want; default values are used for local, but this is required for remote +* [Options]({{< ref "options.md" >}}) to describe the kind of session you want; default values are used for local, but + this is required for remote * Some form of [Http Client Configuration]({{< ref "http_client.md" >}}) (the implementation varies between languages) * [Listeners]({{< ref "listeners.md" >}}) @@ -23,23 +24,24 @@ Each language allows a session to be created with arguments from one of these cl The primary unique argument for starting a local driver includes information about starting the required driver service on the local machine. -* [Service]({{< ref "service.md" >}}) object applies only to local drivers and provides information about the browser driver +* [Service]({{< ref "service.md" >}}) object applies only to local drivers and provides information about the browser + driver {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/drivers/service.spec.js#L32-L36" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -51,12 +53,11 @@ on the local machine. The primary unique argument for starting a remote driver includes information about where to execute the code. Read the details in the [Remote Driver Section]({{< ref "remote_webdriver.md" >}}) - ## Quitting Sessions Quitting a session corresponds to W3C command for [Deleting a Session](https://w3c.github.io/webdriver/#delete-session). -Important note: the `quit` method is different from the `close` method, +Important note: the `quit` method is different from the `close` method, and it is recommended to always use `quit` to end the session {{< tabpane text=true >}} diff --git a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md index d10139307c94..ec7f56939997 100644 --- a/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/drivers/_index.zh-cn.md @@ -8,7 +8,7 @@ weight: 3 ## 创建会话 -创建会话对应于W3C的命令 [新建会话](https://w3c.github.io/webdriver/#new-session) +创建会话对应于W3C的命令 [新建会话](https://w3c.github.io/webdriver/#new-session) 会话是通过初始化新的驱动类对象自动创建的. @@ -27,19 +27,19 @@ weight: 3 {{< tabpane text=true >}} {{< tab header="Java" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/drivers/OptionsTest.java#L23" >}} {{< /tab >}} {{% tab header="Python" %}} {{< gh-codeblock path="examples/python/tests/drivers/test_options.py#L10" >}} {{% /tab %}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/dotnet/SeleniumDocs/BaseTest.cs#L42" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="examples/ruby/spec/drivers/options_spec.rb#L14" >}} {{< /tab >}} {{< tab header="JavaScript" >}} -{{< badge-code >}} +{{< gh-codeblock path="examples/javascript/test/drivers/service.spec.js#L32-L36" >}} {{< /tab >}} {{< tab header="Kotlin" >}} {{< badge-code >}} @@ -51,7 +51,6 @@ weight: 3 用于启动远程驱动的首要唯一参数包括有关在何处执行代码的信息. 请浏览 [远程驱动章节]({{< ref "remote_webdriver.md" >}})中的详细信息 - ## 退出会话 退出会话对应于W3C的命令 [删除会话](https://w3c.github.io/webdriver/#delete-session).