That frame you are seeing is the AXInspector. Calabash iOS requires that Accessibility be enabled to work. I am not sure what moved the AXInspector to the corner of the Simulator. The easiest way to remove the AXInspect is to use the iOS Simulator > Reset Content and Settings menu...

You can achieve this either with a FOR loop or with a "Wait until keyword succeeds". See both examples: *** Test Cases *** test with for loop :FOR ${loopIndex} IN RANGE 10 \ ${element_is_here} = Run Keyword and return status Page should contain element xpath=//*[.='Continue'] \ Exit For Loop If...

You're mixing languages here. You are using Java keywords, with pybot (which is pure python - and doesn't support java). You need to use jybot instead (you can download the jar and run it with java) Jybot is based on Jython - and supports python and java code. ...

We would need more informations about the library you use (I assume robotframework-selenium2library) and the error message you get, but I guess you are hitting are firefox version incompatibility. Note that Selenium lib sometimes needs to be updated when new version of browsers appear. Last time I checked, the last...

You can use this. This would select the anchor descendants of section and get you the second node. This works with xslt processor, hope this works with Selenium //section[@id='mysection']/descendant::a[2] ...

A simple solution is to create a list that contains the month abbreviations, and then ask python to look up the abbreviation in the list. This will work as long as you know for certain what the abbreviations will be, and they will always be in the list: *** Variables...

To import the library with arguments, just add them after the library name: Library TestClass ARG1 ARG2 So the "import" and the instantiation are done in one shot. Now, the thing that can be tricky is to understand the scope of your instance. This is well explained in the User...

Why not use Selenium 2 library for what you want to do? Let the Web driver open Firefox for you. And you have keywords for locating the user and password fields. Just look for Selenium 2 library login example ...

func is passed in as a string, and you are trying to execute the string, which is why you get the error that you do. Simply put, you can't expect to do func(), it will never work because you aren't being passed a reference to a function. What you need...

Use a suite file If you put all of those suites in a folder, you can attach a suite teardown in the folder which will run after all of the child suites finish. $ mkdir all_tests $ mv suite*.robot all_tests $ # edit all_tests/__init__.robot to have a suite teardown $...

Are you 100% sure there is an cookie anyway? What I would do it : try with another URL on which you know there actually is a cookie (www.google.com?) try to add a cookie (keyword: add cookie) just before you log, so that you can see, at least, that the...

At first, you can always define your test site structure in the setup methods of your plone.app.testing based test layer. (See docs for plone.app.testing for details.) In addition to that, there are at least a few ways to build test site structure for plone.app.robotframework based Selenium tests: The first is...

I can only test the XPath, but with //div[@id='button-1571']/descendant::button[contains(@class, 'x-btn-center')]/ span[contains(@class,'x-btn-icon icon-plus')] it's not the button that is selected, but the span: <span id="button-1571-btnIconEl" class="x-btn-icon icon-plus" /> When changing the XPath to //div[@id='button-1571']/descendant::button[contains(@class, 'x-btn-center')]/ span[contains(@class,'x-btn-icon icon-plus')]/.. or, just as second notation //div[@id='button-1571']/descendant::button[contains(@class,...

You can't return values in a setup. Your two choices are to set a test level variable in your setup keyword (using the Set test variable keyword), or call your setup keyword as the first step in your test rather than as a setup step. Personally I prefer the former.

Creating suite variables in test cases The BuiltIn library has a keyword named Set Suite Variable which lets you set a variable that is global for the whole suite. All you need to do is call this after creating your object: ${node}= Connect To ${proto} ${hostname} ${username} ${password} ${port} Set...

According to the comment in the source code of the lib, terminate_process method is not supported by Jython: "Unfortunately at least beta releases of Jython 2.7 do not seem to support it either". And when you launch with RobotFramework jar, you are in fact launching with Jython, so you hit...

Robot redefines sys.stdout. This is mentioned in the robot framework user's guide in the section labelled Logging Information (see the subtitle "Logging to console". Another option, that is only available with Python, is writing messages to sys.__stdout__ or sys.__stderr__. When using this approach, messages are written to the console immediately...

Read Data From Excel calls Get Row Values and not Get All Values of the Row, which creates dictionaries. Get All Values of the Row is not used in the code provided. Perhaps you are thinking that Read Data From Excel is using your user keyword when it in fact...

What the error literally means is that you can't put named arguments (eg: x=y) before positional arguments. In the code you show in your question you are giving the keyword a named argument of content=${QPID_COMMAND} followed by another argument that begins with ${QPID}. Could it be that you have a...

I have tried a lot to get my expected output by using Robot Framework APIs but didn't get proper solution. Finally I got my solution by using import xml.etree.ElementTree as ET module. By using xml.etree.ElementTree module I am parsing my robot result.xml file and getting my work done. ` import...

You aren't passing a dictionary, you're passing a string that looks like a dictionary. The solution is to create a proper dictionary and pass that in. Robot has a Create Dictionary keyword for this purpose. *** Settings *** | Library | Collections *** Test Cases *** | Example | |...

Overview It's main use is to enable writing acceptance tests with a high level of abstraction for software products. The framework requires less technical skill than programming language-based frameworks, and so can be used by team members who have very little programming experience. For example, an agile team product owner...

You can't quite do exactly what you want, because robot syntax doesn't allow you to pass variables to a resource file. However, I don't think there's any reason to pass in @{arguments} -- myKeywords.txt should be able to use the variable directly. This setup works for me: configuration.txt: *** Variables...

You have several problems working against you. It seems like you have a fundamental misunderstanding of how python-based keywords work. Two keywords with the same name You are defining and importing a library named regexp_def.py. In it there is one keyword, "pass_fail_criteria". Robot will remove the underscores, so from robot's...

The error message you are seeing comes from the library initialization. You probably have a constructor method in my.robot.car, which expects two arguments. You either have to provide the arguments in the line where you take library into use, or create a zero-arg constructor for the library.

You can prefix the pipe with a backslash. The robot framework users guide has a section on escaping: There is no need to escape empty cells (other than the trailing empty cells) when using the pipe and space separated format. The only thing to take into account is that possible...

Overview You are using Run keyword if incorrectly. You must give it a keyword as the first argument after the condition, not a variable reference. It will return whatever the keyword returns, which you can save in a variable. In other words, instead of this (using pipe-separated values for clarity):...

Telnet library uses some introspection magic, supported by RF dynamic library interface. When Telnet library is taken into use, get_keyword_names is called. This inspects also the TelnetConnection class for it's own methods and registers these as keywords. During execution RF calls e.g. Telnet.write, which is handled by the __getattr__ method,...

Your resources.txt should start with the "variables" header: *** Variables *** ${URL1} http://www.4shared.com/ ${URL2} http://depositfiles.com/ ${URL3} https://www.gmail.com/ See Resource file structure in the User Guide: "The higher-level structure of resource files is the same as that of test case files otherwise"....

Finally, I re setup os for MAC, I know this is not good solution for this issue. List all detail steps below： Python 2.7.5(this is best choose, or you can setup version 2.7.x) wxPython 2.8.12.1(must need unicode version http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/) robot framework (lastest version: ) robot framework RIDE (BETTER version 1.2.3...

Yes. Use the Run Keywords keyword, and use the special argument AND to separate your keywords. For example: *** Settings *** | Test Setup | Run keywords | ... | A keyword | with | arguments | ... | AND | Another keyword | with | arguments | ... |...

1. NameError: name 'i' is not defined When you use the extended variable syntax, everything inside the curly braces is evaluated by the python interpreter. However, the i in your code is a robot variable, not a python variable. Also, to access an individual element of an array you need...

You cannot get robot to automatically add this special top-level suite when you run only a single suite. Only when you run two or more suites will Robot automatically generate this top level suite. This feature is mentioned in the robot framework user's guide, in a section titled Specifying test...

It took me some time to realise that in RF the parameters passed to my custom keyword ${d} = Get Nearest Date 1 1 are actually strings. Passing number variables solves this issue: ${d} = Get Nearest Date ${1} ${1} ...

You can use metadata in your test suites. Those metadata can contains external links. This is explained in the "Free test suite metadata" section of the User Guide. Here is how it looks if you use TXT format for your tests: *** Settings *** Metadata Here is a link http://www.external.com/pages.html...

First of all, you can get use ${CURDIR} and his friends. ${CURDIR} An absolute path to the directory where the test data file is located. This variable is case-sensitive. ${TEMPDIR} An absolute path to the system temporary directory. In UNIX-like systems this is typically /tmp, and in Windows c:\Documents and...

The key to solve this is to know which instance of selenium you are refering to when you call open_browser and that can be controlled by being explicit refering to the Selenium remote RC client_web.open_browser or by using Keyword Set Library Search Order. *** Settings *** Library SeleniumLibrary 120 ${CLIENT_IP}...

It looks like you have defined it in the test case teardown instead of the test suite teardown. You can change it to use the Test teardown instead. Edit: Here are two solutions: 1. Change your keyword to the TEST specific one, Run Keyword If Test Failed which applies to...

No, there is no builtin for that. You will have do something along those lines: generate a random index using Generate Random String or sample like mentioned in this question. Use Select from list by index keyword on your list (from Selenium2Library) using the random index you generated in the...

There is nothing provided by robot to give you this information. However, it's pretty easy to write a python script that uses the robot parser to get all of the tag information. Here's a quick hack that I think is correct (though I only tested it very briefly): from robot.parsing...

If you escape your regular expression, you're essentially converting the expression into a fixed string. You also have the problem that your pattern begins and ends with a single quote. Since robot treats the whole cell as the expression, your expression will only match if it actually begins and ends...

There are no built-in keywords to do this, but writing one in python is pretty simple. For example, create a file named "readmore.py" with the following: from robot.libraries.BuiltIn import BuiltIn class readmore(object): ROBOT_LIBRARY_SCOPE = "TEST SUITE" def __init__(self): self.fp = {} def read_more(self, path): # if we don't already know...

Just add THREE DOTS (...) in first cell before ELSE IF keyword ${txt} Set Variable ${txt}= Run Keyword If ${lenght} > 5 Some Keyword ... ELSE IF ${lenght} < 5 Some Keyword ... ELSE Some Keyword Log ${txt} ...

Selenium2Library doesn't currently have support for inserting text into a prompt. I've opened an issue in the issue tracker for this: https://github.com/rtomac/robotframework-selenium2library/issues/292 Until it gets added, you can create your own selenium library by subclassing Selenium2Library, and you can add the function to your version. For example, create a file...

There are many ways. For one, just use the path. For example: *** Settings *** | Library | ../Custom Libraries/customlibrary.py Or, you can add Test Library/Custom Libraries to your PYTHONPATH variable and just use the library name itself: *** Settings *** | Library | customlibrary Or, you can set a...

There is no way to do that with variables. All variables from resource files have the same priority. If multiple variables have the same name then only the one that was imported first is taken into use. [source] Your only options are: Splitting the suite with both imports into two...

There are several ways, all documented in the Robot Framework Users Guide. Using command line arguments You can define variables on the command line using command line options (--variable) option. For example: pybot --variable FOO:hello mysuite.robot You can define multiple variables by putting the variables in an argument file, and...

You can call the built-in keyword Fatal Error to cause the execution to be halted. From the documentation: Stops the whole test execution. The test or suite where this keyword is used fails with the provided message, and subsequent tests fail with a canned message. Possible teardowns will nevertheless be...

This is not a good / recommended / possible way to go. Robot framework doesn't support it, and for a good reason. It is not sustainable to create such dependencies in the long term (or even short term). Tests shouldn't depend on other tests. Mainly not on other tests from...

If you route your traffic through a proxy server like Browser Mob Proxy, you should be able to accomplish this task. You could use one of the HTTP libraries to interrogate the proxy to see the traffic it captured, such as the AUT's AJAX calls.

Robot has a library named Process which is specifically designed for starting and stopping processes. You can use the Start Process and Terminate Process keywords to start and stop the webserver via a suite setup and suite teardown. It would look something like this: *** Settings *** | Library |...

Yes you can. This is all documented fairly extensively in the robot framework user guide, in the section titled Creating test libraries. You have a couple of choices. You can use your module directly, which makes every method in the module available as a keyword. This is probably not what...

There must be a problem with the name of the Python module used for your keyword library. if the name of your module is QuizLibrary.py, then change the case in the Library import in your test: Library QuizLibrary.py if the name of your module is quizlibrary.py, then align the name...

There are a couple of problems with your code 1) when you do a FOR over a variable, use @{variable} instead of $(variable) See doc about loop in Robot User Guide. 2) the arrary you are looping over is an array with a single element (a dict) so you will...

Starting with robot framework 2.8.5, you can register a library as a listener. See Test Libraries as Listeners in the robot framework user's guide. The original feature request is discussed in issue 811 The following is a simple example. It is a library that provides a single keyword, "require test...

I had to install the tk-dev package (in my case by using sudo apt-get install tk-dev) and recompile the Python I was using on my virtualenv. I found the answer here: http://stackoverflow.com/a/5459492/644075...

With robotframework, you don't write tests in another programming language, your tests are in the robot language. You don't use junit or jasmine with robot. So, that seems to violate requirement (2) in your question. However, you can write keywords in java or python, and have your tests execute those...

You need to set the scope of your library. From the Robot Framework User's Guide (emphasis mine): Robot Framework attempts to keep test cases independent from each other: by default, it creates new instances of test libraries for every test case. However, this behavior is not always desirable, because sometimes...

First of all you are not doing any mistake. There is a bug in the risto.py code itself (line 461): plotter = Plotter(opts['tag'], not opts['nocritical'], not opts['noall'], not opts['nototals'], not opts['nopassed'], not opts['nofailed'], opts['width'], opts['height'], opts['font'], opts['marker'], opts['xticks']) replace it with the follwing: plotter = Plotter(opts['tag'], opts['critical'], opts['all'], opts['totals'], opts['passed'],...

You can do a couple of things. The first is to create a new keyword that calls all the other keywords, and then call that from Run keyword if. This might be the most readable solution, but at the expense of having to write and document another keyword. The other...

Strictly speaking, no, it's not possible. Within a suite or test setup you can only call keywords, you cannot set variables to the result of other keywords directly within the setup statement . That being said, it's easy to create a custom setup keyword that does what you want. For...

Yes, it is possible. In your python code you can get a reference to the BuiltIn library, and then use the Run Keyword keyword to run any keyword you want. For example, you could write a python keyword that takes another keyword as an argument and runs it. The following...

No you can't. If you want a row for each "should contain" then each of those call should be made in its own test case. But I think the problem lies in your "I have to do it inside a specific test case as it is deploy on zephyr". Whatever...

No, you cannot force resource files to be loaded from the command line. Unless your resource files are absolutely huge (as in, 100's or 1000's of megabytes) or are used in thousands of test suites, the time to parse them is typically measured in milliseconds.

By default variables are string in Robot. So your first two statements are assigning strings like "xx,yy" to your vars. Then "evaluate" just execute your statement as Python would do. So, adding your two strings with commas will produce a list: $ python >>> 1,2+3,4 (1, 5, 4) So you...

Not directly. The list of automatic variables available in Robot Framework is available in the User Guide. There is no such thing as the source of the keyword call. There are many workarounds though. Either you use multiple keyword variations that call your "core" keyword, or you use an argument...

You could put it inside a for loop. It is not infinite but if you put large enough value it is close enough for practical purposes. This will create a huge log file. testcase1 :FOR ${index} IN RANGE 999999 \ Open Connection ${TEST} \ Rest of code http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#for-loops...

Take a close look at the error message: No keyword with name 'Run Keyword If '${checkmessageoutput}' == 'Expected aircraft ID, i.e. MLH001'' found. Notice it's not saying there's no keyword named Run Keyword If, but rather Run Keyword If '${check.... In other words, you're missing a separator between the keyword...

You can use Get List Items which will return a list of all items and then use Get Length to get the number of elements in the list: Select Options Test Open Browser your_url chrome @{items} Get List Items id=select_list_id ${list_length} Get Length ${items} Should Be True ${list_length} > 1...

In my opinion, the best approach is to have separate tests. If you insist on having a test case with optional steps, the way I would do this is to put the optional parts in one or more keywords, and then use Run Keyword If to conditionally exclude a step....

Given that short page snippet, it is hard to tell. But I would try the following: Use Wait Until Element Is Visible prior to clicking the element. Use Set Selenium Timeout to set the timeout for this appropriately. You should get at least a better error message. Use Firefox console...

If you are asking about how to call a keyword in the Metadata setting, the answer is that you can't. What you can do, however, is call a keyword that sets the metadata. Within the Metadata setting, however, you can only define strings. To set the metadata via a keyword...