Robot Framework :: Selenium2Library

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

License

License

Categories

Categories

SBE Data Data Structures
GroupId

GroupId

com.github.markusbernhardt
ArtifactId

ArtifactId

selenium2library
Last Version

Last Version

1.1.0.2
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 selenium2library

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.seleniumhq.selenium : selenium-server jar 2.30.0
com.opera : operadriver jar 1.1
org.robotframework : robotframework jar 2.7.7
org.aspectj : aspectjrt jar 1.6.11

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.1.0.2
1.1.0.1
1.1.0.0