Skip to content

Commit 671371d

Browse files
committed
added execution commands for all languages to follow script example
1 parent 2c7aeb6 commit 671371d

File tree

4 files changed

+124
-2
lines changed

4 files changed

+124
-2
lines changed

examples/dotnet/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Running all test from Selenium C# example
2+
3+
Follow these steps to run all test examples from selenium C#
4+
5+
1. Clone this repository
6+
7+
```
8+
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
9+
```
10+
11+
2. Navigate to `dotnet` directory
12+
13+
```
14+
cd seleniumhq.github.io/examples/dotnet
15+
```
16+
17+
3. Install dependecies using dotnet
18+
19+
```
20+
dotnet restore
21+
```
22+
23+
4. Run all tests
24+
> Open the terminal or command prompt and navigate to the directory where your test project's .csproj file is located and run the following command in the terminal
25+
26+
```
27+
dotnet test
28+
```
29+
30+
# Execute a C# script
31+
32+
Use this command to run a C# script and follow the first script example
33+
34+
```
35+
dotnet run HelloSelenium.cs
36+
```

examples/java/README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Running all tests from Selenium java example
2+
3+
Follow these steps to run all test examples from selenium java
4+
5+
1. Clone this repository
6+
7+
```
8+
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
9+
```
10+
11+
2. Navigate to `java` directory
12+
13+
```
14+
cd seleniumhq.github.io/examples/java
15+
```
16+
17+
3. Install & build dependencies using grandlew
18+
19+
```
20+
gradle build
21+
```
22+
23+
4. Run all tests
24+
25+
```
26+
gradle test
27+
```
28+
29+
# Compile a java file
30+
31+
Use this command to compile a java script and follow the first script example
32+
33+
```
34+
javac FirstScript.js
35+
```
36+
37+
# Execute a java file
38+
39+
Use this command to run a java file
40+
41+
```
42+
java FirstScript
43+
```

examples/kotlin/README.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Running all tests from Selenium kotlin example
2+
3+
Follow these steps to run all test examples from selenium kotlin
4+
5+
1. Clone this repository
6+
7+
```
8+
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
9+
```
10+
11+
2. Navigate to `kotlin` directory
12+
13+
```
14+
cd seleniumhq.github.io/examples/kotlin
15+
```
16+
17+
3. Install dependencies (using maven)
18+
19+
```
20+
mvn clean install
21+
```
22+
23+
4. Run all tests
24+
25+
```
26+
mvn test
27+
```
28+
> or to run all tests in a specific class you can run `mvn -Dtest=classname test`
29+
30+
# Compile kotlin script and follow the first script example
31+
32+
Compile kotlin file
33+
```
34+
kotlinc FirstScriptTest.kt -include-runtime -d FirstScriptTest.jar
35+
```
36+
37+
# Execute a kotlin script
38+
39+
Execute
40+
```
41+
java -jar FirstScriptTest.jar
42+
```

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

+3-2
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#L37" >}}
237237
{{< /tab >}}
238238
{{< tab header="CSharp" >}}
239-
{{< badge-code >}}
239+
{{< gh-codeblock path="examples/dotnet/README.md#L35" >}}
240240
{{< /tab >}}
241241
{{< tab header="Ruby" >}}
242242
{{< gh-codeblock path="examples/ruby/README.md#L36" >}}
@@ -245,7 +245,8 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
245245
{{< gh-codeblock path="examples/javascript/README.md#L36" >}}
246246
{{< /tab >}}
247247
{{< tab header="Kotlin" >}}
248-
{{< badge-code >}}
248+
{{< gh-codeblock path="examples/kotlin/README.md#L32-36 >}}
249+
{{< gh-codeblock path="examples/kotlin/README.md#L39-42 >}}
249250
{{< /tab >}}
250251
{{< /tabpane >}}
251252

0 commit comments

Comments
 (0)