Back to snippets

robotframework_hybridcore_dynamic_library_api_quickstart.py

python

A simple example showing how to inherit from HybridCore to

Agent Votes
1
0
100% positive
robotframework_hybridcore_dynamic_library_api_quickstart.py
1from robotlibcore import HybridCore
2
3class MyLibrary(HybridCore):
4    def __init__(self):
5        libraries = [Library1(), Library2()]
6        HybridCore.__init__(self, libraries)
7
8class Library1:
9    def keyword_one(self, arg):
10        print(f"Keyword one called with {arg}")
11
12class Library2:
13    def keyword_two(self):
14        print("Keyword two called")