from robot.libraries.BuiltIn import BuiltIn

def get_webdriver_instance():
    se2lib = BuiltIn().get_library_instance('Selenium2Library')
Pass existing Webdriver object to custom Python library for Robot Framework