Reputation: 109
I have installed Robot Framework. I am searching for example Test Cases for Robot Framework using Selenium Library.
I need a guideline to start writing TCs on Robot Framework. Help is appreciated.
Upvotes: 2
Views: 15806
Reputation: 37816
I have found a Maven project of Robot Framework (RF) with Selenium2Library. The following are the steps to run:
Pre-requisite: Java (1.5 or newer), Maven
Download "robotframework-selenium2library-java-master.zip" from the following URL:
https://github.com/MarkusBernhardt/robotframework-selenium2library-java
Unzip the folder
[Note: It needs to analyse the folder and coding infrastructure. The codes are in src folder. It's important to understand the pom.xml]
The following link might be very helpful. There are step by step description how to write test cases in Getting Started section.
http://www.wallix.org/2011/07/26/how-to-use-robotframework-with-the-selenium-library/
Upvotes: 1
Reputation: 888
It is not clear from your question what you're trying to achieve. Do you want to run Robot Framework from Java ? Do you want to define keywords in Java?
I suspect you are aiming at the wrong tool.
First, Robot Framework tests are written in human-like language. Phrases are defined by keywords that can be implemented either as user keywords using the built-in language or as external keywords using Python/Java classes.
Second, Robot Framework is a tool to write Acceptance Tests. In such kind of tests, you pick your entire system and stimulate it with certain input and expect and verify a certain output/behaviour.
Now, what is important is the system entry-point. If your system entry-point is an executable it is not relevant if the testing process is in Python or Java; because all the test has to do is starting a new program.
If you interact with your system using a Java library then you need to define external keywords in Java using the library.
If you want to run Robot Framework from Java (without the need to install Python):
java -jar robotframework-2.6.3.jar --help
java -jar robotframework-2.6.3.jar mytests.txt
java -jar robotframework-2.6.3.jar --variable name:value mytests.txt
You find the jar here: https://code.google.com/p/robotframework/downloads/list
You will need to write some test cases before. I suggest to use RIDE ( https://github.com/robotframework/RIDE ) as test editor, but you need to install Python to run it.
Upvotes: 1