所以可以說我在python中有這個方法def get_data(notificaition): print("Notification Recived: ", notificaition)然后我有另一種方法可以接收事件并獲取該事件的值。def verify_singal_r(): with Session() as session: connection = Connection("http://example/signalr", session) print(connection) logging.info("got the connection") presenceservice = connection.register_hub('MyHub') connection.start() def print_error(error): print('error: ', error) connection.error += print_error # TODO: NEED TO ADD POST REQUEST HERE presenceservice.client.on('Notified', get_data) connection.wait(10)一旦關鍵字Verify_Signal運行,我就會得到我需要的值并將它們打印到控制臺上如何使用get_data機器人框架中的值?我試著簡單地使用*** Test Cases ***Get Event Back verify_singal_r get_data但這不起作用,因為 get_data 需要參數。
使用 Robot Framework 從 Python 中的方法返回值
慕碼人8056858
2021-06-30 17:42:46