Skip to content

Commit 92bcc9c

Browse files
committed
Update doc for version 3.0.0
1 parent 1bb715c commit 92bcc9c

File tree

3 files changed

+127
-7
lines changed

3 files changed

+127
-7
lines changed

README.md

+101-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In order to include *Selenium-Jupiter* in a Maven project, first add the followi
1919
<dependency>
2020
<groupId>io.github.bonigarcia</groupId>
2121
<artifactId>selenium-jupiter</artifactId>
22-
<version>2.2.0</version>
22+
<version>3.0.0</version>
2323
</dependency>
2424
```
2525

@@ -79,26 +79,121 @@ public class SeleniumJupiterDockerTest {
7979

8080
@Test
8181
public void testFirefox(
82-
@DockerBrowser(type = FIREFOX, version = "60.0") RemoteWebDriver driver) {
83-
// use Firefox (version 60.0) in this test
82+
@DockerBrowser(type = FIREFOX, version = "64.0") RemoteWebDriver driver) {
83+
// use Firefox (version 64.0) in this test
8484
}
8585

8686
@Test
8787
public void testAndroid(
88-
@DockerBrowser(type = ANDROID, version = "7.1.1") RemoteWebDriver driver) {
89-
// use Android (version 7.1.1) in this test
88+
@DockerBrowser(type = ANDROID, version = "9.0") RemoteWebDriver driver) {
89+
// use Android (version 9.0) in this test
9090
}
9191

9292
}
9393
```
9494

95+
96+
## Selenium-Jupiter CLI
97+
98+
As of version 2.2.0, Selenium-Jupiter can used interactively from the Command Line Interface (CLI), i.e. the shell, to get VNC sessions of Docker browsers (Chrome, Firefox, Opera, Android). There are two ways of using this feature:
99+
100+
* Directly from the source code, using Maven. The command to be used is ``mvn exec:java -Dexec.args="browserName"``. For instance:
101+
102+
```
103+
> mvn exec:java -Dexec.args="chrome"
104+
[INFO] Scanning for projects...
105+
[INFO]
106+
[INFO] ------------------------------------------------------------------------
107+
[INFO] Building Selenium-Jupiter 3.0.0
108+
[INFO] ------------------------------------------------------------------------
109+
[INFO]
110+
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ selenium-jupiter ---
111+
[INFO] Using SeleniumJupiter to execute chrome (latest) in Docker
112+
[DEBUG] Preference found CHROME=71.0 (valid until 2019-01-07 19:53:47)
113+
[INFO] Using CHROME version 71.0 (latest)
114+
[DEBUG] Preference found selenoid/vnc:chrome_71.0=pulled (valid until 2019-01-07 19:53:51)
115+
[DEBUG] Preference found aerokube/selenoid:1.8.4=pulled (valid until 2019-01-07 19:53:53)
116+
[INFO] Starting Docker container aerokube/selenoid:1.8.4
117+
[DEBUG] Creating WebDriver for CHROME at http://172.17.0.1:32782/wd/hub
118+
Jan 07, 2019 6:54:19 PM org.openqa.selenium.remote.ProtocolHandshake createSession
119+
INFO: Detected dialect: OSS
120+
[DEBUG] Preference found psharkey/novnc:3.3-t6=pulled (valid until 2019-01-07 19:53:59)
121+
[INFO] Starting Docker container psharkey/novnc:3.3-t6
122+
[INFO] Session id fe492bee1ecebceb645cf58275a63bd6
123+
[INFO] VNC URL (copy and paste in a browser navigation bar to interact with remote session)
124+
[INFO] http://172.17.0.1:32783/vnc.html?host=172.17.0.1&port=32782&path=vnc/fe492bee1ecebceb645cf58275a63bd6&resize=scale&autoconnect=true&password=selenoid
125+
[INFO] Press ENTER to exit
126+
127+
[INFO] Stopping Docker container aerokube/selenoid:1.8.4
128+
[INFO] Stopping Docker container psharkey/novnc:3.3-t6
129+
[INFO] ------------------------------------------------------------------------
130+
[INFO] BUILD SUCCESS
131+
[INFO] ------------------------------------------------------------------------
132+
[INFO] Total time: 21.240 s
133+
[INFO] Finished at: 2019-01-07T16:26:47+01:00
134+
[INFO] Final Memory: 33M/453M
135+
[INFO] ------------------------------------------------------------------------
136+
```
137+
138+
* Using Selenium-Jupiter as a *fat-jar* (i.e. Selenium-Jupiter with all its dependencies in a single executable JAR file). This JAR file can downloaded from [here](https://github.com/bonigarcia/selenium-jupiter/releases/download/selenium-jupiter-3.0.0/selenium-jupiter-3.0.0-fat.jar) and also it can be created using the command ``mvn compile assembly:single`` from the source code. Once you get the *fat-jar*, you simply need to use the command ``java -jar selenium-jupiter-3.0.0-fat.jar browserName``, for instance:
139+
140+
```
141+
> java -jar selenium-jupiter-3.0.0-fat.jar chrome
142+
[INFO] Using SeleniumJupiter to execute chrome (latest) in Docker
143+
[DEBUG] Preference found CHROME=71.0 (valid until 2019-01-07 19:53:47)
144+
[INFO] Using CHROME version 71.0 (latest)
145+
[DEBUG] Preference found selenoid/vnc:chrome_71.0=pulled (valid until 2019-01-07 19:53:51)
146+
[DEBUG] Preference found aerokube/selenoid:1.8.4=pulled (valid until 2019-01-07 19:53:53)
147+
[INFO] Starting Docker container aerokube/selenoid:1.8.4
148+
[DEBUG] Creating WebDriver for CHROME at http://172.17.0.1:32784/wd/hub
149+
Jan 07, 2019 6:55:17 PM org.openqa.selenium.remote.ProtocolHandshake createSession
150+
INFO: Detected dialect: OSS
151+
[DEBUG] Preference found psharkey/novnc:3.3-t6=pulled (valid until 2019-01-07 19:53:59)
152+
[INFO] Starting Docker container psharkey/novnc:3.3-t6
153+
[INFO] Session id 8edd28c130bb2bc62f8e4467c20f4dc0
154+
[INFO] VNC URL (copy and paste in a browser navigation bar to interact with remote session)
155+
[INFO] http://172.17.0.1:32785/vnc.html?host=172.17.0.1&port=32784&path=vnc/8edd28c130bb2bc62f8e4467c20f4dc0&resize=scale&autoconnect=true&password=selenoid
156+
[INFO] Press ENTER to exit
157+
158+
[INFO] Stopping Docker container aerokube/selenoid:1.8.4
159+
[INFO] Stopping Docker container psharkey/novnc:3.3-t6
160+
```
161+
162+
## Selenium-Jupiter Server
163+
164+
As of version 3.0.0, Selenium-Jupiter can used as a server. To start this mode, the shell is used. Once again, two options are allowed:
165+
166+
* Directly from the source code and Maven. The command to be used is ``mvn exec:java -Dexec.args="server <port>"``. If the second argument is not specified, the default port will be used (4042):
167+
168+
```
169+
$ mvn exec:java -Dexec.args="server"
170+
[INFO] Scanning for projects...
171+
[INFO]
172+
[INFO] ------------------------------------------------------------------------
173+
[INFO] Building Selenium-Jupiter 3.0.0
174+
[INFO] ------------------------------------------------------------------------
175+
[INFO]
176+
[INFO] --- exec-maven-plugin:1.6.0:java (default-cli) @ selenium-jupiter ---
177+
[INFO] Selenium-Jupiter server listening on http://localhost:4042/wd/hub
178+
```
179+
180+
* Using Selenium-Jupiter as a [fat-jar](https://github.com/bonigarcia/selenium-jupiter/releases/download/selenium-jupiter-3.0.0/selenium-jupiter-3.2.0-fat.jar). For instance:
181+
182+
```
183+
> java -jar webdrivermanager-3.0.0-fat.jar server
184+
[INFO] Selenium-Jupiter server listening on http://localhost:4042/wd/hub
185+
```
186+
187+
When the Selenium-Jupiter server is up and running, it acts as a regular Selenium Server for Docker browsers (Chrome, Firefox,. Opera, Android), and its URL can be used in tests using regular Selenium's ``RemoteWebDriver`` objects.
188+
189+
95190
## Documentation
96191

97192
You can find more details and examples on the [Selenium-Jupiter user guide].
98193

99194
## About
100195

101-
Selenium-Jupiter (Copyright &copy; 2017-2018) is a project by [Boni Garcia] licensed under [Apache 2.0 License]. Comments, questions and suggestions are always very [welcome][Selenium-Jupiter issues]!
196+
Selenium-Jupiter (Copyright &copy; 2017-2019) is a project by [Boni Garcia] licensed under [Apache 2.0 License]. Comments, questions and suggestions are always very [welcome][Selenium-Jupiter issues]!
102197

103198
[Apache 2.0 License]: http://www.apache.org/licenses/LICENSE-2.0
104199
[Boni Garcia]: http://bonigarcia.github.io/

changelog

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
selenium-jupiter (3.0.0)
2+
3+
+ Selenium-Jupiter server
4+
+ Thread-safe handling to allow concurrent tests (JUnit 5.3)
5+
+ Remove global instance of configuration object (use @RegisterExtension instead)
6+
+ Allow using @Options annotation for different browsers (ChromeOptions, FirefoxOptions, etc.)
7+
+ Include parameter in test templates for Selenium Server URL (issue #17)
8+
+ RemoteWebDriver creation using timeout and poll time
9+
+ Use Java preferences to store latest versions of Docker browsers (Chrome, Firefox, Opera) and pulled images
10+
+ Fix issue #22 (template-tests with multiple test methods per class)
11+
+ Fix issue #20 (@Options annotation is ignored when there is a superclass)
12+
+ Fix issue #36 (when DockerDriverHandler stats container with Android, it doesn't pass proxy settings)
13+
+ Fix issue #31 (when sel.jup.browser.list.from.docker.hub=true legacy docker images are not available)
14+
+ Fix issue #29 (use thread-safe collections for concurrent tests)
15+
+ Maven dependency: org.seleniumhq.selenium:selenium-java 3.141.59
16+
+ Maven dependency: io.github.bonigarcia:webdrivermanager 3.2.0
17+
+ Maven dependency: io.appium:java-client 7.0.0
18+
+ Maven dependency: com.spotify:docker-client 8.14.5
19+
+ Maven dependency: com.codeborne:phantomjsdriver 1.4.4
20+
+ Docker hub dependency: aerokube/selenoid:1.8.4
21+
+ Docker hub dependency: butomo1989/docker-android-x86*:1.5-p6
22+
23+
-- Boni Garcia <[email protected]> Mon, 07 Jan 2018 17:02:00 +0200
24+
25+
126
selenium-jupiter (2.2.0)
227

328
+ Include Android browsers in Docker using butomo1989 images

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.github.bonigarcia</groupId>
77
<artifactId>selenium-jupiter</artifactId>
8-
<version>2.2.1-SNAPSHOT</version>
8+
<version>3.0.0-SNAPSHOT</version>
99

1010
<properties>
1111
<!-- Dependencies -->

0 commit comments

Comments
 (0)