Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
38 changes: 38 additions & 0 deletions examples/java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Running all tests from Selenium Java example

Follow these steps to run all test example 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 dependencies using maven
Ensure that JDK and Maven is installed on the system.

```
mvn test-compile
```

4. Run all tests

```
mvn test
```

> 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 first Java example

Use this command to run first Java Example

```
mvn exec:java -D"exec.mainClass"="dev.selenium.getting_started.FirstScript" -D"exec.classpathScope"=test
```
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ See [Quitting Sessions]({{< ref "../drivers/#quitting-sessions" >}}).

{{< tabpane text=true >}}
{{< tab header="Java" >}}
{{< badge-code >}}
{{< gh-codeblock path="examples/java/README.md#L37" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< badge-code >}}
Expand Down