通过获取Selenium2Library的实例来获取driver

from robot.libraries.BuiltIn import BuiltIn
def get_webdriver_instance():
    seleniumlib = BuiltIn().get_library_instance('Selenium2Library')
    return seleniumlib.driver

  

posted on 2021-09-16 10:09  Old-Kang  阅读(40)  评论(0编辑  收藏  举报