diff --git a/examples/dotnet/README.md b/examples/dotnet/README.md new file mode 100644 index 00000000000..59508705f30 --- /dev/null +++ b/examples/dotnet/README.md @@ -0,0 +1,61 @@ +# Running Selenium .NET (C#) Tests + +The following steps will guide you on how to +run Selenium .NET (C#) tests using the examples +from the `SeleniumHQ/seleniumhq.github.io` repository. + +## Initial Setup + +### Prerequisites + +Ensure you have the following installed: + +- [.NET SDK (8.0 or later)](https://dotnet.microsoft.com/en-us/download) +- An IDE like [Visual Studio](https://visualstudio.microsoft.com/) or [Visual Studio Code](https://code.visualstudio.com/) +- [.NET CLI tools](https://learn.microsoft.com/en-us/dotnet/core/tools/) + +### Clone the repository + +Clone the Selenium documentation repository to your local machine: + +```bash +git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git +``` + +## Navigate to the .NET directory +### Change into the .NET examples directory: + +```bash +cd seleniumhq.github.io/examples/dotnet/SeleniumDocs +``` + +## Running the Tests +### Restore dependencies +Install necessary dependencies using the .NET CLI: + +```bash +dotnet restore +``` + +### Run all tests +To run all available tests: + +```bash +dotnet test +``` + +### Run a Specific Test Method +To run a specific test method using its fully qualified name: + +```bash +dotnet test --filter "FullyQualifiedName=Namespace.ClassName.MethodName" +``` +For example: +```bash +dotnet test --filter "FullyQualifiedName=SeleniumDocs.GettingStarted.UsingSeleniumTest.EightComponents" +``` + +You can also filter by test name only (if it's unique): +```bash +dotnet test --filter "Name=EightComponents" +``` \ No newline at end of file diff --git a/website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md b/website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md index f8ef1efd4b9..8aac63374e9 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md @@ -236,7 +236,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). {{< gh-codeblock path="/examples/python/README.md#L35" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/README.md#L36" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/first_script.ja.md b/website_and_docs/content/documentation/webdriver/getting_started/first_script.ja.md index 05345638b66..82ab61836d8 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/first_script.ja.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/first_script.ja.md @@ -237,7 +237,7 @@ Seleniumを使用して、それをうまく行うことは高度なトピック {{< gh-codeblock path="/examples/python/README.md#L35" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/README.md#L36" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md b/website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md index 3f934228b3b..bedaf4afb40 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md @@ -238,7 +238,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}). {{< gh-codeblock path="/examples/python/README.md#L35" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/README.md#L36" >}} diff --git a/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md b/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md index 82fa2c9310b..051f74227e8 100644 --- a/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md @@ -251,7 +251,7 @@ Selenium所做的一切, {{< gh-codeblock path="/examples/python/README.md#L35" >}} {{< /tab >}} {{< tab header="CSharp" >}} -{{< badge-code >}} +{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}} {{< /tab >}} {{< tab header="Ruby" >}} {{< gh-codeblock path="/examples/ruby/README.md#L36" >}}