Giter Site home page Giter Site logo

ractoc / robotframework-seleniumlibrary-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marketsquare/robotframework-seleniumlibrary-java

0.0 1.0 0.0 726 KB

Java port of the Python based SeleniumLibrary for Robot Framework

License: Apache License 2.0

Shell 0.13% AspectJ 0.26% Java 97.00% RobotFramework 2.61%

robotframework-seleniumlibrary-java's Introduction

Java port of the Python based SeleniumLibrary for Robot Framework

Introduction

SeleniumLibrary is a web testing library for Robot Framework that leverages the Selenium libraries from the Selenium project.

Version number follows Selenium's version numbers (first 3 numbers), and 4th number is reserved for e.g. issue fixes.

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.

Usage, Selenium 2

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.hi-fi</groupId>
    <artifactId>robotframework-seleniumlibrary</artifactId>
    <version>2.53.1.1</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.

  • 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.

Usage, Selenium 3

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.hi-fi</groupId>
    <artifactId>robotframework-seleniumlibrary</artifactId>
    <version>3.141.59.265</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. Running of tests with this can be done with command java -jar robotframework-seleniumlibrary-3.141.59.265-jar-with-dependencies.jar <test location>.

  • 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.

Differences

  • Some keyword differences between this and Python version exists. (Same) keywords should be aligned in upcoming versions.
  • Older version of the library was imported as Library Selenium2Library (both Java and Python versions). Since 2.53.1.1 (and later major versions) import is done as Library SeleniumLibrary

Browser drivers

After installing the library, you still need to install browser and operating system specific browser drivers for all those browsers you want to use in tests. These are the exact same drivers you need to use with Selenium also when not using SeleniumLibrary. More information about drivers can be found from Selenium documentation__.

The general approach to install a browser driver is downloading a right driver, such as chromedriver for Chrome, and placing it into a directory that is in PATH__. Drivers for different browsers can be found via Selenium documentation or by using your favorite search engine with a search term like selenium chrome browser driver. New browser driver versions are released to support features in new browsers, fix bug, or otherwise, and you need to keep an eye on them to know when to update drivers you use.

Drivers can also be fetched with [https://github.com/Ardesco/selenium-standalone-server-plugin|Selenium Driver Binary Downloader plugin].

With At 3.141.59.265 [https://github.com/bonigarcia/webdrivermanager|WebdriverManager] is taken to use, so handling of drivers can also be done with standalone JAR from tests itself.

__ https://seleniumhq.github.io/selenium/docs/api/py/index.html#drivers __ https://en.wikipedia.org/wiki/PATH_(variable)

Demo

This is a maven project. You can execute the integration tests (using jBrowser) with:

mvn integration-test

Other browsers are behind profiles (require browser installation with Firefox and Google Chrome, but not driver. Driver downloaded directly from Internet, so runner needs to have access to it.):

  • Firefox: mvn integration-test -Pfirefox
  • Google Chrome: mvn integration-test -Pgooglechrome
  • PhantomJS: mvn integration-test -Pphantomjs

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 SeleniumLibrary, Robot Framework
  • StackTraces or other debug output containing error information

robotframework-seleniumlibrary-java's People

Contributors

andrei-straut avatar atmcarmo avatar dunand avatar eramitmittal avatar hi-fi avatar jakubkorepta avatar jussimalinen avatar justinclagg avatar lmartorella avatar logima avatar mammenj avatar markusbernhardt avatar ractoc avatar wojtekkowaluk avatar yauhenipo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.