2

I am very new at Java and Selenium so my apologies in advance if my question sounds a bit primary.

As you can see here I am suggested to use Robot Framework . The issue is that I am using Java and need a framework in form of a jar file that I can add it to my Java program and like other jar files call its method.

Can I use this Robot Framework in this way? and if no, is there anything like that in Java?

2 Answers 2

2

Yes. Bold added for relevant quote from the link to the Robot Framework homepage you provided;

Robot Framework is operating system and application independent. The core framework is implemented using Python and runs also on Jython (JVM) and IronPython (.NET).

You would need to start by adding Jython (which is Python implemented in Java).

Sign up to request clarification or add additional context in comments.

Comments

2

I suggest you use Maven to handle dependencies.

Use the Robotframework maven plugin that will manage the Robot Framework dependencies:

http://robotframework.org/MavenPlugin/

Afterwords, you will need to add the dependency to Selenium and SeliniumLibrary.

The Robot Framework and Selenium are both testing frameworks but very different:

  • Robot Framework is used for acceptance test driven development where you write your test cases in text files that follow a special syntax to also make it readable by a program. Usually you will have to write so called glue code where you implement the generated test cases: Robot Framework translates the acceptance test text to Code that you can fill with the actual test implementation.

  • Selenium is a UI testing tool which lets you implement tests against your web interface / UI on several browsers. It reflects the browsers DOM and simulates user interaction / user input.

    A Selenium test usually

    1. starts a browser via a driver (e.g. firefox driver, chrome etc.)

    2. goes to a specific url within that browser (usually localhost://... when developing)

    3. interacts with the website such as clicking a button
    4. validates the result e.g. a label shows "button was clicked"
    5. shuts down the browser

A combination of both is using Robot Framework with SeleniumLibrary which maps the keywords in a Robot test case text file to Selenium commands. See more information here:

https://blog.codecentric.de/en/2012/04/robot-framework-tutorial-a-complete-example/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.