File tree Expand file tree Collapse file tree 5 files changed +65
-4
lines changed
website_and_docs/content/documentation/webdriver/getting_started Expand file tree Collapse file tree 5 files changed +65
-4
lines changed Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
236
236
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
237
237
{{< /tab >}}
238
238
{{< tab header="CSharp" >}}
239
- {{< badge-code >}}
239
+ {{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
240
240
{{< /tab >}}
241
241
{{< tab header="Ruby" >}}
242
242
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}
Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ Seleniumを使用して、それをうまく行うことは高度なトピック
237
237
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
238
238
{{< /tab >}}
239
239
{{< tab header="CSharp" >}}
240
- {{< badge-code >}}
240
+ {{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
241
241
{{< /tab >}}
242
242
{{< tab header="Ruby" >}}
243
243
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
238
238
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
239
239
{{< /tab >}}
240
240
{{< tab header="CSharp" >}}
241
- {{< badge-code >}}
241
+ {{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
242
242
{{< /tab >}}
243
243
{{< tab header="Ruby" >}}
244
244
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}
Original file line number Diff line number Diff line change @@ -251,7 +251,7 @@ Selenium所做的一切,
251
251
{{< gh-codeblock path="/examples/python/README.md#L35" >}}
252
252
{{< /tab >}}
253
253
{{< tab header="CSharp" >}}
254
- {{< badge-code >}}
254
+ {{< gh-codeblock path="/examples/dotnet/README.md#L55" >}}
255
255
{{< /tab >}}
256
256
{{< tab header="Ruby" >}}
257
257
{{< gh-codeblock path="/examples/ruby/README.md#L36" >}}
You can’t perform that action at this time.
0 commit comments