Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit a697098

Browse files
committed
Release 4.0.0.0 with Selenium 4.0.0
- Selenium 4.0.0.0 - Support Java 11+ only - Dropped support for Jbrowser as missing Java 11 package
1 parent cb43589 commit a697098

File tree

5 files changed

+78
-119
lines changed

5 files changed

+78
-119
lines changed

.github/workflows/codeql-analysis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ selenium4, develop, master ]
16+
branches: [ develop, master ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ selenium4, develop ]
19+
branches: [ develop ]
2020
schedule:
2121
- cron: '15 5 * * 6'
2222

.github/workflows/maven.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ on:
77
- '*'
88
branches:
99
- develop
10-
- selenium4
1110

1211
jobs:
1312
build_and_test:
1413
strategy:
1514
fail-fast: false
1615
matrix:
1716
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
18-
java-version: [ 8 ]
19-
browser: ['jbrowser', 'googlechromeheadless', 'firefoxheadless', 'edgeheadless'] # 'htmlunitwithjs' not working with Selenium4
17+
java-version: [ 11 ]
18+
browser: ['googlechromeheadless', 'firefoxheadless', 'edgeheadless']
2019
include:
2120
- os: ubuntu-latest
2221
set_display: export DISPLAY=:99; Xvfb :99 -screen 0 1024x768x24 -ac -noreset & sleep 3
@@ -118,7 +117,7 @@ jobs:
118117
uses: actions/[email protected]
119118
with:
120119
distribution: zulu
121-
java-version: 8
120+
java-version: 11
122121
- name: Release Maven package
123122
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709
124123
with:

README.md

+54-61
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
Java port of the Python based SeleniumLibrary for Robot Framework
2-
==========================================================================
1+
# Java port of the Python based SeleniumLibrary for Robot Framework
32

4-
Introduction
5-
------------
3+
## Introduction
64

75
SeleniumLibrary is a web testing library for Robot Framework that leverages
86
the Selenium libraries from the [Selenium](http://docs.seleniumhq.org) project.
@@ -11,93 +9,89 @@ Version number follows Selenium's version numbers (first 3 numbers), and 4th num
119

1210
This Java version of SeleniumLibrary exists because of easier dependency management when Robot Framework is used in Java-projects. Library is a quite direct alternative to the Python SeleniumLibrary.
1311

14-
Usage, Selenium 2
15-
-----------------
12+
## Usage, Selenium 4
13+
1614
If you are using the robotframework-maven-plugin you can
17-
use this library by adding the following dependency to
15+
use this library by adding the following dependency to
1816
your pom.xml:
1917

2018
<dependency>
21-
<groupId>com.github.hi-fi</groupId>
19+
<groupId>com.github.marketsquare</groupId>
2220
<artifactId>robotframework-seleniumlibrary</artifactId>
23-
<version>2.53.1.1</version>
21+
<version>4.0.0.0</version>
2422
<scope>test</scope>
2523
</dependency>
2624

2725
If you cannot use the robotframework-maven-plugin you can use the
28-
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1-jar-with-dependencies.jar),
29-
which contains all required libraries.
26+
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0.0/robotframework-seleniumlibrary-4.0.0.0-jar-with-dependencies.jar),
27+
which contains all required libraries except ios/android ones (Appium and Selendroid). Running of tests with this can be done with command `java -jar robotframework-seleniumlibrary-4.0.0.0-jar-with-dependencies.jar <test location>`.
3028

31-
* More information about this library can be found in the
32-
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1.html).
33-
* For keyword completion in RIDE you can download this
34-
[Library Specs](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1.xml)
29+
- More information about this library can be found in the
30+
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0.0/robotframework-seleniumlibrary-4.0.0.0.html).
31+
- For keyword completion in RIDE you can download this
32+
[Library Specs](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0.0/robotframework-seleniumlibrary-4.0.0.0.xml)
3533
and place it in your PYTHONPATH.
3634

35+
## Old versions
3736

38-
Usage, Selenium 3
39-
-----------------
37+
### Usage, Selenium 2
4038

4139
If you are using the robotframework-maven-plugin you can
42-
use this library by adding the following dependency to
40+
use this library by adding the following dependency to
4341
your pom.xml:
4442

4543
<dependency>
4644
<groupId>com.github.hi-fi</groupId>
4745
<artifactId>robotframework-seleniumlibrary</artifactId>
48-
<version>3.141.59.26535</version>
46+
<version>2.53.1.1</version>
4947
<scope>test</scope>
5048
</dependency>
5149

5250
If you cannot use the robotframework-maven-plugin you can use the
53-
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535-jar-with-dependencies.jar),
54-
which contains all required libraries. Running of tests with this can be done with command `java -jar robotframework-seleniumlibrary-3.141.59.26535-jar-with-dependencies.jar <test location>`.
51+
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1-jar-with-dependencies.jar),
52+
which contains all required libraries.
5553

56-
* More information about this library can be found in the
57-
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535.html).
58-
* For keyword completion in RIDE you can download this
59-
[Library Specs](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535.xml)
54+
- More information about this library can be found in the
55+
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1.html).
56+
- For keyword completion in RIDE you can download this
57+
[Library Specs](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/2.53.1.1/robotframework-seleniumlibrary-2.53.1.1.xml)
6058
and place it in your PYTHONPATH.
6159

62-
Usage, Selenium 4 (WIP)
63-
-----------------------
60+
### Usage, Selenium 3
6461

6562
If you are using the robotframework-maven-plugin you can
66-
use this library by adding the following dependency to
63+
use this library by adding the following dependency to
6764
your pom.xml:
6865

6966
<dependency>
70-
<groupId>com.github.marketsquare</groupId>
67+
<groupId>com.github.hi-fi</groupId>
7168
<artifactId>robotframework-seleniumlibrary</artifactId>
72-
<version>4.0.0-rc-1.0</version>
69+
<version>3.141.59.26535</version>
7370
<scope>test</scope>
7471
</dependency>
7572

7673
If you cannot use the robotframework-maven-plugin you can use the
77-
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0-rc-1.0/robotframework-seleniumlibrary-4.0.0-rc-1.0-jar-with-dependencies.jar),
78-
which contains all required libraries except ios/android ones (Appium and Selendroid). Running of tests with this can be done with command `java -jar robotframework-seleniumlibrary-4.0.0-rc-1.0-jar-with-dependencies.jar <test location>`.
74+
[jar-with-dependencies](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535-jar-with-dependencies.jar),
75+
which contains all required libraries. Running of tests with this can be done with command `java -jar robotframework-seleniumlibrary-3.141.59.26535-jar-with-dependencies.jar <test location>`.
7976

80-
* More information about this library can be found in the
81-
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0-rc-1.0/robotframework-seleniumlibrary-4.0.0-rc-1.0.html).
82-
* For keyword completion in RIDE you can download this
83-
[Library Specs](https://repo1.maven.org/maven2/com/github/marketsquare/robotframework-seleniumlibrary/4.0.0-rc-1.0/robotframework-seleniumlibrary-4.0.0-rc-1.0.xml)
77+
- More information about this library can be found in the
78+
[Keyword Documentation](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535.html).
79+
- For keyword completion in RIDE you can download this
80+
[Library Specs](https://repo1.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.26535/robotframework-seleniumlibrary-3.141.59.26535.xml)
8481
and place it in your PYTHONPATH.
8582

86-
Testing IOS/Android browsers with library
87-
-----------------------------------------
83+
## Testing IOS/Android browsers with library
84+
8885
Pre-Selenium 4 fat-jar contains Appium and Selendroid that allow testing of IOS and Android browsers. Those are dropped in Selenium 4 -versions,
8986
so dependencies needs to be handles self with either Maven/Gradle or manually. If there's need to have fat-jar with those, please create issue about that.
9087

91-
Differences
92-
-----------
88+
## Differences
9389

94-
* Some keyword differences between this and [Python version](https://github.com/robotframework/SeleniumLibrary) exists. (Same) keywords should be aligned in upcoming versions.
95-
* Older version of the library was imported as `Library Selenium2Library` (both Java and Python versions).
96-
Since 2.53.1.1 (and later major versions) import is done as `Library SeleniumLibrary`
90+
- Some keyword differences between this and [Python version](https://github.com/robotframework/SeleniumLibrary) exists. (Same) keywords should be aligned in upcoming versions.
91+
- Older version of the library was imported as `Library Selenium2Library` (both Java and Python versions).
92+
Since 2.53.1.1 (and later major versions) import is done as `Library SeleniumLibrary`
9793

98-
99-
Browser drivers
100-
---------------
94+
## Browser drivers
10195

10296
After installing the library, you still need to install browser and
10397
operating system specific browser drivers for all those browsers you
@@ -106,10 +100,10 @@ Selenium also when not using SeleniumLibrary. More information about
106100
drivers can be found from [Selenium documentation](https://seleniumhq.github.io/selenium/docs/api/py/index.html#drivers).
107101

108102
The general approach to install a browser driver is downloading a right
109-
driver, such as ``chromedriver`` for Chrome, and placing it into
110-
a directory that is in [PATH](https://en.wikipedia.org/wiki/PATH_(variable)). Drivers for different browsers
103+
driver, such as `chromedriver` for Chrome, and placing it into
104+
a directory that is in [PATH](<https://en.wikipedia.org/wiki/PATH_(variable)>). Drivers for different browsers
111105
can be found via Selenium documentation or by using your favorite
112-
search engine with a search term like ``selenium chrome browser driver``.
106+
search engine with a search term like `selenium chrome browser driver`.
113107
New browser driver versions are released to support features in
114108
new browsers, fix bug, or otherwise, and you need to keep an eye on them
115109
to know when to update drivers you use.
@@ -118,25 +112,24 @@ Drivers can also be fetched with [Selenium Driver Binary Downloader plugin](http
118112

119113
After version 3.141.59.265 [WebdriverManager](https://github.com/bonigarcia/webdrivermanager) is taken to use, so handling of drivers can also be done with standalone JAR from tests itself.
120114

121-
Demo
122-
----
115+
## Demo
123116

124117
This is a maven project. You can execute the integration tests (using [jBrowser](https://github.com/machinepublishers/jbrowserdriver)) with:
125118

126119
mvn integration-test
127-
128-
Other browsers are behind profiles
120+
121+
Other browsers are behind profiles
129122
(require browser installation with Firefox and Google Chrome, but not driver. Driver downloaded directly from Internet, so runner needs to have access to it.):
130123

131-
* Firefox: mvn integration-test -Pfirefox
132-
* Google Chrome: mvn integration-test -Pgooglechrome
133-
* PhantomJS: mvn integration-test -Pphantomjs
124+
- Firefox: mvn integration-test -Pfirefox
125+
- Google Chrome: mvn integration-test -Pgooglechrome
126+
- PhantomJS: mvn integration-test -Pphantomjs
134127

135-
Getting Help
136-
------------
128+
## Getting Help
137129

138130
The [user group for Robot Framework](https://groups.google.com/forum/#!forum/robotframework-users)
139131
is the best place to get help. Consider including in the post:
140-
* Full description of what you are trying to do and expected outcome
141-
* Version number of SeleniumLibrary, Robot Framework
142-
* StackTraces or other debug output containing error information
132+
133+
- Full description of what you are trying to do and expected outcome
134+
- Version number of SeleniumLibrary, Robot Framework
135+
- StackTraces or other debug output containing error information

pom.xml

+19-44
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
43
<modelVersion>4.0.0</modelVersion>
54

65
<groupId>com.github.marketsquare</groupId>
76
<artifactId>robotframework-seleniumlibrary</artifactId>
8-
<version>4.0.0-rc-1.1-SNAPSHOT</version>
7+
<version>4.0.0.0</version>
98
<packaging>jar</packaging>
109

1110
<name>Robot Framework :: SeleniumLibrary</name>
@@ -73,13 +72,13 @@
7372
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7473
<downloadSources>true</downloadSources>
7574
<downloadJavadocs>true</downloadJavadocs>
76-
<aspectj.version>1.9.8.M1</aspectj.version>
77-
<java.version>1.8</java.version>
75+
<aspectj.version>1.9.8.RC1</aspectj.version>
76+
<java.version>11</java.version>
7877
<robotframework.maven.plugin.version>2.1.0</robotframework.maven.plugin.version>
7978
<robotframework.version>4.1</robotframework.version>
80-
<selenium.version>4.0.0-rc-1</selenium.version>
79+
<selenium.version>4.0.0</selenium.version>
8180
<keywords.class>SeleniumLibrary</keywords.class>
82-
<browser>jbrowser</browser>
81+
<browser>googlechromeheadless</browser>
8382
<downloadWebDriver>False</downloadWebDriver>
8483
</properties>
8584

@@ -124,7 +123,7 @@
124123
<dependency>
125124
<groupId>io.appium</groupId>
126125
<artifactId>java-client</artifactId>
127-
<version>7.5.1</version>
126+
<version>7.6.0</version>
128127
<exclusions>
129128
<exclusion>
130129
<groupId>org.seleniumhq.selenium</groupId>
@@ -143,9 +142,9 @@
143142
<version>1.3</version>
144143
</dependency>
145144
<dependency>
146-
<groupId>com.machinepublishers</groupId>
147-
<artifactId>jbrowserdriver</artifactId>
148-
<version>1.1.1</version>
145+
<groupId>org.seleniumhq.selenium</groupId>
146+
<artifactId>htmlunit-driver</artifactId>
147+
<version>2.53.0</version>
149148
<exclusions>
150149
<exclusion>
151150
<groupId>org.seleniumhq.selenium</groupId>
@@ -155,27 +154,12 @@
155154
<groupId>org.seleniumhq.selenium</groupId>
156155
<artifactId>selenium-api</artifactId>
157156
</exclusion>
157+
<exclusion>
158+
<groupId>org.seleniumhq.selenium</groupId>
159+
<artifactId>selenium-support</artifactId>
160+
</exclusion>
158161
</exclusions>
159162
</dependency>
160-
<dependency>
161-
<groupId>org.seleniumhq.selenium</groupId>
162-
<artifactId>htmlunit-driver</artifactId>
163-
<version>2.53.0</version>
164-
<exclusions>
165-
<exclusion>
166-
<groupId>org.seleniumhq.selenium</groupId>
167-
<artifactId>selenium-remote-driver</artifactId>
168-
</exclusion>
169-
<exclusion>
170-
<groupId>org.seleniumhq.selenium</groupId>
171-
<artifactId>selenium-api</artifactId>
172-
</exclusion>
173-
<exclusion>
174-
<groupId>org.seleniumhq.selenium</groupId>
175-
<artifactId>selenium-support</artifactId>
176-
</exclusion>
177-
</exclusions>
178-
</dependency>
179163
<dependency>
180164
<groupId>org.mockito</groupId>
181165
<artifactId>mockito-core</artifactId>
@@ -185,12 +169,12 @@
185169
<dependency>
186170
<groupId>io.github.bonigarcia</groupId>
187171
<artifactId>webdrivermanager</artifactId>
188-
<version>5.0.2</version>
172+
<version>5.0.3</version>
189173
</dependency>
190174
<dependency>
191175
<groupId>org.apache.commons</groupId>
192176
<artifactId>commons-lang3</artifactId>
193-
<version>3.9</version>
177+
<version>3.12.0</version>
194178
</dependency>
195179
</dependencies>
196180

@@ -216,13 +200,11 @@
216200

217201
<plugins>
218202
<plugin>
219-
<!-- Set 1.7 as target, use project source encoding -->
220203
<groupId>org.apache.maven.plugins</groupId>
221204
<artifactId>maven-compiler-plugin</artifactId>
222205
<version>3.8.1</version>
223206
<configuration>
224-
<source>${java.version}</source>
225-
<target>${java.version}</target>
207+
<release>11</release>
226208
<encoding>${project.build.sourceEncoding}</encoding>
227209
<optimize>true</optimize>
228210
<debug>true</debug>
@@ -394,19 +376,12 @@
394376
</build>
395377
</profile>
396378
<profile>
397-
<id>jbrowser</id>
379+
<id>htmlunitwithjs</id>
398380
<properties>
399-
<browser>jbrowser</browser>
381+
<browser>htmlunitwithjs</browser>
400382
<downloadWebDriver>False</downloadWebDriver>
401383
</properties>
402384
</profile>
403-
<profile>
404-
<id>htmlunitwithjs</id>
405-
<properties>
406-
<browser>htmlunitwithjs</browser>
407-
<downloadWebDriver>False</downloadWebDriver>
408-
</properties>
409-
</profile>
410385
<profile>
411386
<id>firefox</id>
412387
<properties>

0 commit comments

Comments
 (0)