Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Open
sadik312 wants to merge 18 commits into SeleniumHQ:trunk
base: trunk
Choose a base branch
Loading
from sadik312:sadik-feature-branch
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
2c7aeb6
added command to run python script to follow first script example
sadik312 May 7, 2024
671371d
added execution commands for all languages to follow script example
sadik312 May 9, 2024
b7d976a
Merge branch 'trunk' into sadik-feature-branch
sadik312 May 9, 2024
f4fcf49
Merge branch 'trunk' into sadik-feature-branch
sadik312 Jul 5, 2024
10e2239
Merge branch 'trunk' into sadik-feature-branch
sadik312 Jul 9, 2024
98e26c1
added microsoft .NET cross-platform installation link
sadik312 Nov 8, 2024
ac1cf3d
Merge branch 'trunk' into sadik-feature-branch
sadik312 Nov 9, 2024
f16bf24
Merge branch 'trunk' into sadik-feature-branch
sadik312 Nov 12, 2024
a2865f9
Merge branch 'trunk' into sadik-feature-branch
sadik312 Nov 25, 2024
f1ef893
Merge branch 'trunk' into sadik-feature-branch
sadik312 Nov 28, 2024
6081a73
Merge branch 'trunk' into sadik-feature-branch
sadik312 Nov 30, 2024
8ec6d1f
Merge branch 'trunk' into sadik-feature-branch
sadik312 Dec 9, 2024
4bf0f96
Merge branch 'trunk' into sadik-feature-branch
sadik312 Dec 17, 2024
38aa219
Merge branch 'trunk' into sadik-feature-branch
sadik312 Dec 18, 2024
ec26159
Merge branch 'trunk' into sadik-feature-branch
sadik312 Dec 22, 2024
cade154
Merge branch 'trunk' into sadik-feature-branch
sadik312 Jan 1, 2025
8fdaa02
Merge branch 'trunk' into sadik-feature-branch
sadik312 Mar 3, 2025
e9a52e3
Merge branch 'trunk' into sadik-feature-branch
sadik312 Apr 20, 2025
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
41 changes: 41 additions & 0 deletions examples/dotnet/README.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Running all test from Selenium C# example

Prerequisite: Install .NET
- This link covers all cross-platform installation steps

https://learn.microsoft.com/en-us/dotnet/core/install/

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
```

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
```
48 changes: 46 additions & 2 deletions examples/java/README.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
# Running Selenium Java Tests
# Running all tests from Selenium java example using gradle

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
```

# Running Selenium Java Tests Using Maven
The following steps will guide you on how to
run Selenium Java tests using a repository
of `SeleniumHQ/seleniumhq.github.io` examples.
Expand Down Expand Up @@ -60,4 +104,4 @@ To run a specific Selenium Java example, use the following command:
mvn exec:java -D"exec.mainClass"="dev.selenium.getting_started.FirstScript" -D"exec.classpathScope"=test
```

Make sure to replace `dev.selenium.getting_started.FirstScript` with the path and name of the example you want to run.
Make sure to replace `dev.selenium.getting_started.FirstScript` with the path and name of the example you want to run.
42 changes: 42 additions & 0 deletions examples/kotlin/README.md
View file Open in desktop
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
```
11 changes: 10 additions & 1 deletion examples/python/README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,19 @@ 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
```
=======
## Execute a specific example
To run a specific Selenium Python example, use the following command:
```bash
pytest path/to/test_script.py
```

Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run.
Make sure to replace `path/to/test_script.py` with the path and name of the example you want to run.
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).
{{< gh-codeblock path="examples/java/README.md#L60" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="examples/python/README.md#L35" >}}
{{< 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 +246,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

AltStyle によって変換されたページ (->オリジナル) /