You can see 'Selenium2Library'!
class Selenium2Library(
_LoggingKeywords,
_RunOnFailureKeywords,
_BrowserManagementKeywords,
_ElementKeywords,
_TableElementKeywords,
_FormElementKeywords,
_SelectElementKeywords,
_JavaScriptKeywords,
_CookieKeywords,
_ScreenshotKeywords,
_WaitingKeywords
):
You just to need to import 'Selenium2Library',but expose all of the keywords! For example:
a module named '_ALibrary.py'
class _ALibrary(object):
def __init__(self):
pass
def fun1(self):
print 'fun1'`
a module named '_BLibrary.py'
class _BLibrary(object):
def __init__(self):
pass
def fun2(self):
print 'fun2'
def fun3(self):
print 'fun3'
a common module named'CommonLibrary.py'
import _ALibrary
import _BLibrary
class CommonLibrary(_BLibrary._BLibrary,_ALibrary._ALibrary):
def __init__(self):
for base in CommonLibrary.__bases__:
base.__init__(self)
so you just to need import 'CommonLibrary.py'