2

I am trying to follow a guide from http://blog.mykhailo.com/2011/02/how-to-sikuli-and-robot-framework.html

trying use sikuli with robot. I managed to get the sikuli part working. But i dont understand how the RobotFramework Keywords work.

It comes up with the follow error

Verify that 2 + 2 = 4
No keyword with name 'Start App' found.
----------------------------------------
Verify that 2 + 2 = 5
No keyword with name 'Start App' found.

I think that the keywords are related to the methods that are created in python. Such as the following.

def startApp(self):
def verifyApp(self):

But i understand how they are initialized.

Can someone please how me clarify on how it works.

Thanks in advance

2 Answers 2

2

Robot Framework tests are made of a list of statements. Each statement is a suite of keywords and arguments. Keywords are defined in the test suite itself or in external libraries See the test case syntax section in the doc.

So if we take the example from the blog you are trying to run:

***Settings***
Library  calc.Calculator  WITH NAME  Calculator

***Test Cases***
Verify that 2 + 2 = 4
    Start App
    Verify App
    Perform Action  2  +  2
    Verify Result  4

The test case "Verify that 2 + 2 = 4" will start by a first statement that does "Start App". But it seems that Robot Framework does not find this keyword in your case. So the import of the library (setting section) is failing. You should be able to see this in the log that is generated at the end of the test execution. Probably a path problem.

1
  • The test case syntax link is now broken. :(
    – Dib
    May 16, 2017 at 12:29
0

Functions in python files can be used as keyword in Robot Framework. Those python files just need to be imported as libraries in Robot Framework. Like this

Library    path/to/lib.py

Try to get some really simple python file to work as a library first. When that works and you start to get how things work, try something more complicated.

Also see Creating test libraries from the documentation.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.