Get Library Instance
In model file, we can get library(class) instance via get_library_instance.
lib name is the lib name when you import in test file.
Example 1:
Setting Value
Library qa.RWWindowsTestAppliance
Library name is qa.RWWindowsTestAppliance.
Example 2:
Setting Value
Library ${RootTarget}/libs/python/lib/qa/AtaWrapper.py
Library name is AtaWrapper.
from robot.libraries.BuiltIn import BuiltIn
def station_disconnect_from_wlan():
apcli = BuiltIn().get_library_instance(‘RWQAAPCLIKeywords’)
version = apcli.get_version()
apcli.set_beacon_interval(“wlan3”, 500)
apcli.get_beacon_interval(“wlan3”)
device_name = apcli.get_device_name()
model_name = apcli.get_model_name()
return model_name
The object return from Get Library Instance can be passed to library keywords and resource keywords.
In the following example,
Get firmware version AP1