from Selenium2Library import Selenium2Library


class CustomSeleniumLibrary(Selenium2Library):

    def get_webdriver_instance(self):
        return self._current_browser()
Pass existing Webdriver object to custom Python library for Robot Framework