Skip to content

Commit 70fd9d0

Browse files
committed
Added a new .NET README.md file to provide instructions for setting up and running Selenium tests using C#.
Updated the "First Script" documentation in multiple languages to include references to the new .NET README with C# example code blocks: English (first_script.en.md) Japanese (first_script.ja.md) Portuguese (first_script.pt-br.md) Simplified Chinese (first_script.zh-cn.md)
1 parent e9573e9 commit 70fd9d0

File tree

5 files changed

+65
-4
lines changed

5 files changed

+65
-4
lines changed

examples/dotnet/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Running Selenium .NET (C#) Tests
2+
3+
The following steps will guide you on how to
4+
run Selenium .NET (C#) tests using the examples
5+
from the `SeleniumHQ/seleniumhq.github.io` repository.
6+
7+
## Initial Setup
8+
9+
### Prerequisites
10+
11+
Ensure you have the following installed:
12+
13+
- [.NET SDK (8.0 or later)](https://dotnet.microsoft.com/en-us/download)
14+
- An IDE like [Visual Studio](https://visualstudio.microsoft.com/) or [Visual Studio Code](https://code.visualstudio.com/)
15+
- [.NET CLI tools](https://learn.microsoft.com/en-us/dotnet/core/tools/)
16+
17+
### Clone the repository
18+
19+
Clone the Selenium documentation repository to your local machine:
20+
21+
```bash
22+
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
23+
```
24+
25+
## Navigate to the .NET directory
26+
### Change into the .NET examples directory:
27+
28+
```bash
29+
cd seleniumhq.github.io/examples/dotnet/SeleniumDocs
30+
```
31+
32+
## Running the Tests
33+
### Restore dependencies
34+
Install necessary dependencies using the .NET CLI:
35+
36+
```bash
37+
dotnet restore
38+
```
39+
40+
### Run all tests
41+
To run all available tests:
42+
43+
```bash
44+
dotnet test
45+
```
46+
47+
### Run a Specific Test Method
48+
To run a specific test method using its fully qualified name:
49+
50+
```bash
51+
dotnet test --filter "FullyQualifiedName=Namespace.ClassName.MethodName"
52+
```
53+
For example:
54+
```bash
55+
dotnet test --filter "FullyQualifiedName=SeleniumDocs.GettingStarted.UsingSeleniumTest.EightComponents"
56+
```
57+
58+
You can also filter by test name only (if it's unique):
59+
```bash
60+
dotnet test --filter "Name=EightComponents"
61+
```

website_and_docs/content/documentation/webdriver/getting_started/first_script.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
236236
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
237237
{{< /tab >}}
238238
{{< tab header="CSharp" >}}
239-
{{< badge-code >}}
239+
{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
240240
{{< /tab >}}
241241
{{< tab header="Ruby" >}}
242242
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}

website_and_docs/content/documentation/webdriver/getting_started/first_script.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ Seleniumを使用して、それをうまく行うことは高度なトピック
237237
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
238238
{{< /tab >}}
239239
{{< tab header="CSharp" >}}
240-
{{< badge-code >}}
240+
{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
241241
{{< /tab >}}
242242
{{< tab header="Ruby" >}}
243243
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}

website_and_docs/content/documentation/webdriver/getting_started/first_script.pt-br.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
238238
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
239239
{{< /tab >}}
240240
{{< tab header="CSharp" >}}
241-
{{< badge-code >}}
241+
{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
242242
{{< /tab >}}
243243
{{< tab header="Ruby" >}}
244244
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}

website_and_docs/content/documentation/webdriver/getting_started/first_script.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ Selenium所做的一切,
251251
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
252252
{{< /tab >}}
253253
{{< tab header="CSharp" >}}
254-
{{< badge-code >}}
254+
{{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
255255
{{< /tab >}}
256256
{{< tab header="Ruby" >}}
257257
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}

0 commit comments

Comments
 (0)