robot.utils.misc
¶
printable_name
¶
Generates and returns printable name from the given string.
Examples: 'simple' -> 'Simple' 'name with spaces' -> 'Name With Spaces' 'more spaces' -> 'More Spaces' 'Cases AND spaces' -> 'Cases AND Spaces' '' -> ''
If 'code_style' is True:
'mixedCAPSCamel' -> 'Mixed CAPS Camel' 'camelCaseName' -> 'Camel Case Name' 'under_score_name' -> 'Under Score Name' 'under_and space' -> 'Under And Space' 'miXed_CAPS_nAMe' -> 'MiXed CAPS NAMe' '' -> ''
Source code in src/robot/utils/misc.py
seq2str
¶
Returns sequence in format 'item 1', 'item 2' and 'item 3'.
Source code in src/robot/utils/misc.py
seq2str2
¶
test_or_task
¶
Replace 'test' with 'task' in the given text depending on rpa.
If given text is test, test or task is returned directly. Otherwise,
pattern {test} is searched from the text and occurrences replaced with
test or task.
In both cases matching the word test is case-insensitive and the returned
test or task has exactly same case as the original.
Source code in src/robot/utils/misc.py
classproperty
¶
Bases: property
Property that works with classes in addition to instances.
Only supports getters. Setters and deleters cannot work with classes due to how the descriptor protocol works, and they are thus explicitly disabled. Metaclasses must be used if they are needed.