def __init__( self, libraries, host='127.0.0.1', port=8270, port_file=None, allow_stop=True, allow_import=None, register_keywords=True, introspection=True, ): """Takes a sequence of Test Library names to import, RobotRemoteServer's additional __init__ options and these optional extra args: :param allow_import: Sequence of Test Library names allowed for keyword `Import Remote Library`. :param register_keywords: Register imported Test Library Keywords directly as remote methods besides Dynamic Robot API methods? :param introspection: Call SimpleXMLRPCServer.register_introspection_functions()? """ TestRobot.__init__(self, name='Remote', BuiltIn=False) TestLibrary.__init__(self) self.register_keywords = bool(register_keywords) self.introspection = bool(introspection) for lib in libraries: self.Import(lib) self.allow_import = list(allow_import or []) # Initialize the RobotRemoteServer base # with a .library.RemoteLibrary proxy # (RobotRemoteServer only accepts a single library instance) RobotRemoteServer.__init__(self, RemoteLibrary(robot=self), host, port, port_file, allow_stop)
def __init__( self, libraries, host='127.0.0.1', port=8270, port_file=None, allow_stop=True, allow_import=None, register_keywords=True, introspection=True, ): """Takes a sequence of Test Library names to import, RobotRemoteServer's additional __init__ options and these optional extra args: :param allow_import: Sequence of Test Library names allowed for keyword `Import Remote Library`. :param register_keywords: Register imported Test Library Keywords directly as remote methods besides Dynamic Robot API methods? :param introspection: Call SimpleXMLRPCServer.register_introspection_functions()? """ TestRobot.__init__(self, name='Remote', BuiltIn=False) TestLibrary.__init__(self) self.register_keywords = bool(register_keywords) self.introspection = bool(introspection) for lib in libraries: self.Import(lib) self.allow_import = list(allow_import or []) # Initialize the RobotRemoteServer base # with a .library.RemoteLibrary proxy # (RobotRemoteServer only accepts a single library instance) RobotRemoteServer.__init__( self, RemoteLibrary(robot=self), host, port, port_file, allow_stop)
def __init__(self): if not self.magic_name: self.magic_name = type(self).__name__ from . import robot_shell if not robot_shell: raise RuntimeError("robotshell is not running.") self.robot_shell = robot_shell TestRobot.__init__(self, self.magic_name, variable_getters=[robot_shell.shell_variable])