Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added command to run python script to follow first script example #1710

Open
wants to merge 14 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions examples/dotnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Running all test from Selenium C# example

Follow these steps to run all test examples from selenium C#

1. Clone this repository

```
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
```

2. Navigate to `dotnet` directory

```
cd seleniumhq.github.io/examples/dotnet
```

3. Install dependecies using dotnet

```
dotnet restore
sadik312 marked this conversation as resolved.
Show resolved Hide resolved
```

4. Run all tests
> 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

```
dotnet test
```

# Execute a C# script

Use this command to run a C# script and follow the first script example

```
dotnet run HelloSelenium.cs
```
43 changes: 43 additions & 0 deletions examples/java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Running all tests from Selenium java example

Follow these steps to run all test examples from selenium java

1. Clone this repository

```
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
```

2. Navigate to `java` directory

```
cd seleniumhq.github.io/examples/java
```

3. Install & build dependencies using grandlew

```
gradle build
```

4. Run all tests

```
gradle test
```

# Compile a java file

Use this command to compile a java script and follow the first script example

```
javac FirstScript.js
```

# Execute a java file

Use this command to run a java file

```
java FirstScript
```
42 changes: 42 additions & 0 deletions examples/kotlin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Running all tests from Selenium kotlin example

Follow these steps to run all test examples from selenium kotlin

1. Clone this repository

```
git clone https://github.com/SeleniumHQ/seleniumhq.github.io.git
```

2. Navigate to `kotlin` directory

```
cd seleniumhq.github.io/examples/kotlin
```

3. Install dependencies (using maven)

```
mvn clean install
```

4. Run all tests

```
mvn test
```
> or to run all tests in a specific class you can run `mvn -Dtest=classname test`

# Compile kotlin script and follow the first script example

Compile kotlin file
```
kotlinc FirstScriptTest.kt -include-runtime -d FirstScriptTest.jar
```

# Execute a kotlin script

Execute
```
java -jar FirstScriptTest.jar
```
8 changes: 8 additions & 0 deletions examples/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@ pytest
```

> Please keep some patience - If you are doing it for the first time, it will take a little while to verify and download the browser drivers

# Execute a python script

Use this command to run a python script and follow the first script example

```
python example_script.py
```
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
{{< badge-code >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/python/README.md#L37" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/dotnet/README.md#L35" >}}
{{< /tab >}}
{{< tab header="Ruby" >}}
{{< gh-codeblock path="examples/ruby/README.md#L36" >}}
Expand All @@ -245,7 +245,8 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
{{< gh-codeblock path="examples/javascript/README.md#L36" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/kotlin/README.md#L32-36 >}}
{{< gh-codeblock path="examples/kotlin/README.md#L39-42 >}}
{{< /tab >}}
{{< /tabpane >}}

Expand Down