You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
# Java port of the Python based SeleniumLibrary for Robot Framework
3
2
4
-
Introduction
5
-
------------
3
+
## Introduction
6
4
7
5
SeleniumLibrary is a web testing library for Robot Framework that leverages
8
6
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
11
9
12
10
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.
13
11
14
-
Usage, Selenium 2
15
-
-----------------
12
+
## Usage, Selenium 4
13
+
16
14
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
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>`.
30
28
31
-
* More information about this library can be found in the
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>`.
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>`.
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>`.
79
76
80
-
* More information about this library can be found in the
Pre-Selenium 4 fat-jar contains Appium and Selendroid that allow testing of IOS and Android browsers. Those are dropped in Selenium 4 -versions,
89
86
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.
90
87
91
-
Differences
92
-
-----------
88
+
## Differences
93
89
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`
97
93
98
-
99
-
Browser drivers
100
-
---------------
94
+
## Browser drivers
101
95
102
96
After installing the library, you still need to install browser and
103
97
operating system specific browser drivers for all those browsers you
@@ -106,10 +100,10 @@ Selenium also when not using SeleniumLibrary. More information about
106
100
drivers can be found from [Selenium documentation](https://seleniumhq.github.io/selenium/docs/api/py/index.html#drivers).
107
101
108
102
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
111
105
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`.
113
107
New browser driver versions are released to support features in
114
108
new browsers, fix bug, or otherwise, and you need to keep an eye on them
115
109
to know when to update drivers you use.
@@ -118,25 +112,24 @@ Drivers can also be fetched with [Selenium Driver Binary Downloader plugin](http
118
112
119
113
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.
120
114
121
-
Demo
122
-
----
115
+
## Demo
123
116
124
117
This is a maven project. You can execute the integration tests (using [jBrowser](https://github.com/machinepublishers/jbrowserdriver)) with:
125
118
126
119
mvn integration-test
127
-
128
-
Other browsers are behind profiles
120
+
121
+
Other browsers are behind profiles
129
122
(require browser installation with Firefox and Google Chrome, but not driver. Driver downloaded directly from Internet, so runner needs to have access to it.):
130
123
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
134
127
135
-
Getting Help
136
-
------------
128
+
## Getting Help
137
129
138
130
The [user group for Robot Framework](https://groups.google.com/forum/#!forum/robotframework-users)
139
131
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
0 commit comments