I hereby claim:
- I am Tattoo on github.
- I am tattoo (https://keybase.io/tattoo) on keybase.
- I have a public key whose fingerprint is B755 BD26 BEA9 7156 F431 2CA8 26A8 BE39 3C12 328E
To claim this, I am signing this object:
from robot.api import ExecutionResult, ResultVisitor | |
import re | |
class KeywordTimes(ResultVisitor): | |
VAR_PATTERN = re.compile(r'^(\$|\@)\{[^\}]+\}(, \$\{[^\}]+\})* = ') | |
def __init__(self): | |
self.keywords = {} |
"""translate_lib.py | |
CLI tool for creating Robot Framework resource file which holds translations for all keywords from a given library. | |
""" | |
import codecs | |
import sys | |
from robot.libdoc import libdoc | |
from StringIO import StringIO | |
def get_kws(lib): |
<!-- take into use: | |
Save this file | |
Open Notepad++ | |
Select menu: Language > Define your language... | |
You get a popup. Select "Import", navigate to xml-file | |
Click "Save as" and name your file eg. "RobotFramework" | |
Now you can open a Robot test suite file and select from Languages -menu the correct language (in the bottom) | |
--> | |
<NotepadPlus> | |
<UserLang name="RobotFramework" ext="txt"> |
*** Test cases *** | |
TEST CASE | |
No Operation | |
No Operation | |
No Operation | |
No Operation | |
No Operation | |
No Operation | |
No Operation |
import sys | |
from robot.api import ExecutionResult, ResultVisitor | |
from robot.result.keyword import Keyword | |
from robot.result.testsuite import TestSuite | |
class dotdict(dict): | |
def __getattr__(self, attr_name): | |
return self[attr_name] | |
def __setattr__(self, attr_name, value): |
class ArgumentConversionException(Exception): | |
pass | |
def _validate(args, conversions): | |
args_len, conversions_len = len(args), len(conversions) | |
msg = None | |
if args_len < conversions_len: | |
msg = ('Too many conversion functions given: %d arguments given when ' | |
'%d conversions got.' % (args_len, conversions_len)) |
/* | |
USAGE: open 'Developer Tools', open 'Console', copy-paste everything. | |
*/ | |
/* First add missing interface for evaluating XPath expressions. | |
This is from wicked-good-xpath https://code.google.com/p/wicked-good-xpath/ | |
*/ |
### First we have pure Robot Framework implementation: | |
## manualtestdata.robot | |
*** Settings *** | |
Library Dialogs | |
*** Keywords *** | |
Manually enter test data |
I hereby claim:
To claim this, I am signing this object:
''' | |
You need to have Keywords-table as the last table inside of the suite- and | |
resource files. Or more clever grepping than presented below. `sed` etc. is also | |
fine if the output would be same as the grep command below. | |
$ grep -irn -A 5000 '* Keywords *' path/to/tests > my_file | |
$ python keywords.py my_file [how_many_scores] | |
or one-liner: | |
$ grep -irn -A 5000 '* Keywords *' path/to/tests | python keywords.py - [how_many_scores] |