1
- ---
2
- title : Python Library Core
3
- ---
1
+ # Python Library Core
4
2
5
3
Tools to ease creating larger test libraries for [ Robot
6
4
Framework] ( http://robotframework.org ) using Python. The Robot Framework
@@ -21,32 +19,27 @@ The version 2.0 support changes in the Robot Framework 3.2.
21
19
22
20
[ ![ image] ( https://github.com/robotframework/PythonLibCore/workflows/CI/badge.svg?branch=master )] ( https://github.com/robotframework/PythonLibCore )
23
21
24
- # Usage
22
+ ## Usage
25
23
26
24
There are two ways to use PythonLibCore, either by
27
- [ HybridCore] {.title-ref} or by using [ DynamicCore] {.title-ref}.
28
- [ HybridCore] {.title-ref} provides support for the hybrid library API and
29
- [ DynamicCore] {.title-ref} provides support for dynamic library API.
25
+ ` HybridCore ` or by using ` DynamicCore ` . ` HybridCore ` provides support for
26
+ the hybrid library API and ` DynamicCore ` provides support for dynamic library API.
30
27
Consult the Robot Framework [ User
31
28
Guide] ( https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-libraries ) ,
32
29
for choosing the correct API for library.
33
30
34
31
Regardless which library API is chosen, both have similar requirements.
35
32
36
- 1 ) Library must inherit either the [ HybridCore] {.title-ref} or
37
- [ DynamicCore] {.title-ref}.
33
+ 1 ) Library must inherit either the ` HybridCore ` or ` DynamicCore ` .
38
34
2 ) Library keywords must be decorated with Robot Framework
39
35
[ \@ keyword] ( https://github.com/robotframework/robotframework/blob/master/src/robot/api/deco.py )
40
36
decorator.
41
37
3 ) Provide a list of class instances implementing keywords to
42
- [ library_components] {.title-ref} argument in the
43
- [ HybridCore] {.title-ref} or [ DynamicCore] {.title-ref}
44
- [ \_\_ init\_\_ ] {.title-ref}.
38
+ ` library_components ` argument in the ` HybridCore ` or ` DynamicCore ` ` __init__ ` .
45
39
46
- It is also possible implement keywords in the library main class, by
47
- marking method with [ \@ keyword] {.title-ref} as keywords. It is not
48
- requires pass main library instance in the
49
- [ library_components] {.title-ref} argument.
40
+ It is also possible implement keywords in the library main class, by marking method with
41
+ ` @keyword ` as keywords. It is not required pass main library instance in the
42
+ ` library_components ` argument.
50
43
51
44
All keyword, also keywords implemented in the classes outside of the
52
45
main library are available in the library instance as methods. This
@@ -150,6 +143,6 @@ class MyPlugi:
150
143
151
144
Then Library can be imported in Robot Framework side like this:
152
145
153
- ``` bash
146
+ ``` robotframework
154
147
Library ${CURDIR}/PluginLib.py plugins=${CURDIR}/MyPlugin.py
155
148
```
0 commit comments