Robot Framework :: Selenium2Library

Java port of the Selenium 2 (WebDriver) Python library for Robot Framework

License

License

Categories

Categories

Java Languages SBE Data Data Structures
GroupId

GroupId

com.github.markusbernhardt
ArtifactId

ArtifactId

robotframework-selenium2library-java
Last Version

Last Version

1.4.0.8
Release Date

Release Date

Type

Type

jar
Description

Description

Robot Framework :: Selenium2Library
Java port of the Selenium 2 (WebDriver) Python library for Robot Framework
Project URL

Project URL

https://github.com/MarkusBernhardt/robotframework-selenium2library-java
Source Code Management

Source Code Management

https://github.com/MarkusBernhardt/robotframework-selenium2library-java

Download robotframework-selenium2library-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.markusbernhardt/robotframework-selenium2library-java/ -->
<dependency>
    <groupId>com.github.markusbernhardt</groupId>
    <artifactId>robotframework-selenium2library-java</artifactId>
    <version>1.4.0.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.markusbernhardt/robotframework-selenium2library-java/
implementation 'com.github.markusbernhardt:robotframework-selenium2library-java:1.4.0.8'
// https://jarcasting.com/artifacts/com.github.markusbernhardt/robotframework-selenium2library-java/
implementation ("com.github.markusbernhardt:robotframework-selenium2library-java:1.4.0.8")
'com.github.markusbernhardt:robotframework-selenium2library-java:jar:1.4.0.8'
<dependency org="com.github.markusbernhardt" name="robotframework-selenium2library-java" rev="1.4.0.8">
  <artifact name="robotframework-selenium2library-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.markusbernhardt', module='robotframework-selenium2library-java', version='1.4.0.8')
)
libraryDependencies += "com.github.markusbernhardt" % "robotframework-selenium2library-java" % "1.4.0.8"
[com.github.markusbernhardt/robotframework-selenium2library-java "1.4.0.8"]

Dependencies

compile (12)

Group / Artifact Type Version
org.robotframework : javalib-core jar 1.2.1
com.github.markusbernhardt : xml-doclet jar 1.0.5
org.seleniumhq.selenium : selenium-server jar 2.48.2
com.opera : operadriver jar 1.5
com.github.detro.ghostdriver : phantomjsdriver jar 1.1.0
org.robotframework : robotframework jar 2.9.2
org.aspectj : aspectjrt jar 1.8.7
com.googlecode.json-simple : json-simple jar 1.1.1
org.seleniumhq.selenium : selenium-remote-driver jar 2.48.2
io.selendroid : selendroid-client jar 0.17.0
io.appium : java-client jar 3.2.0
org.apache.commons : commons-exec jar 1.3

Project Modules

There are no modules declared in this project.

Java port of the Selenium 2 (WebDriver) Python library for Robot Framework

Repository moved

Maintainer of the library is changed, and new repository is at https://github.com/Hi-Fi/robotframework-seleniumlibrary-java.

Introduction

Selenium2Library is a web testing library for Robot Framework that leverages the Selenium 2 (WebDriver) libraries from the Selenium project. It is modeled after (and forked from) the Robot Framework SeleniumLibrary library, but re-implemented to use Selenium 2 and WebDriver technologies.

  • More information about this library can be found in the Keyword Documentation.
  • For keyword completion in RIDE you can download this Library Specs and place it in your PYTHONPATH.

This Java port of the existing Selenium2Library was created to enable the usage of a Selenium 2 library with Jython.

  • Python Selenium2Library needs Python 2.6 upwards
  • The latests stable release of Jython is 2.5.3
  • Jython 2.7b2 is a beta version
  • There seems to be only slow development of a stable Jython 2.7

Usage

This library is a direct replacement to the Python Selenium2Library. There are almost no changes necesssary to the existing code. You can execute the same testcases and keywords with Python and Jython.

If you are using the robotframework-maven-plugin you can use this library by adding the following dependency to your pom.xml:

<dependency>
    <groupId>com.github.markusbernhardt</groupId>
    <artifactId>robotframework-selenium2library-java</artifactId>
    <version>1.4.0.8</version>
    <scope>test</scope>
</dependency>

If you cannot use the robotframework-maven-plugin you can use the jar-with-dependencies, which contains all required libraries.

If you want more control and feel adventurous you could you use this jar and provide all required libraries from this list on your own.

Differences

  • Selenium Speed not implemented

    Setting the Selenium Speed is deprecated several years and not implemented in WebDriver. The Python Selenium2Library tries to emulate the old behavior. I have not implemented this emulation for the following reasons.

    • As far as I understand the emulation is broken and only works with RemoteWebDriver
    • I do not know how to implement that in a correct way with Java
    • There is a reason, why this is not implemented in WebDriver. It's a bad idea.

Demo

This is a maven project. If you have firefox installed, you can execute the unit tests with:

mvn integration-test

Getting Help

The user group for Robot Framework is the best place to get help. Consider including in the post:

  • Full description of what you are trying to do and expected outcome
  • Version number of Selenium2Library, Robot Framework, and Selenium
  • StackTraces or other debug output containing error information

Versions

Version
1.4.0.8
1.4.0.7
1.4.0.6
1.4.0.5
1.4.0.4
1.4.0.3
1.4.0.2
1.4.0.1
1.4.0.0
1.2.0.14
1.2.0.13
1.2.0.12
1.2.0.11
1.2.0.10
1.2.0.9
1.2.0.8
1.2.0.7
1.2.0.6
1.2.0.5
1.2.0.4
1.2.0.3
1.2.0.1
1.2.0.0
1.1.0.7
1.1.0.6
1.1.0.5
1.1.0.4
1.1.0.3