Experts,
am trying to export my python methods as remote library. when my python method returns class object to robot framework, it is getting saved as string.
when i use the same python libraries as local library, its saved getting saved as class object.
am printing the variable type received by my python function
with Remote library
==============
<msg timestamp="20161221 21:45:29.543" level="INFO">This is variable type: <type 'str'></msg>
with local library
============
<msg timestamp="20161221 22:09:27.964" level="INFO">This is variable type: <class 'restlib.RestConnect'></msg>
My Robot file:
==========
*** Settings ***
Documentation Suite description
Library Remote
http://127.0.0.1:8270Library cpt.testcaseLib.ExampleLib.Example_keyword_Lib
*** Variables ***
${testplan} ""
${nsx_mgr} ""
*** Test Cases ***
Python Demo Test
[tags] Python
Set nsx api connection ${EXEC_DIR}/mseg_Scale.yml
Disable ARP for Spoofgaurd ip detect
check ARP status in Spoofgaurd ip detect
*** Keywords ***
Set nsx api connection
[Documentation] Initiate a Rest API connection NSX Manager
[Arguments] ${setup_yml_file}
${yml_dict} = read contents from setup file mseg_Scale.yml
set suite variable ${testplan} ${yml_dict}
${nsx_con} = get connection to nsxm ${yml_dict} => here i get the class object from one python method.
set suite variable ${nsx_mgr} ${nsx_con}
Disable ARP for Spoofgaurd ip detect
[Documentation] Keyword to set the Spoof Guard IP detect settings
${status} = set snoop setting ${nsx_mgr} true false => here i pass the class object to another python method.
should be true ${status}
check ARP status in Spoofgaurd ip detect
[Documentation] Keyword to check the Spoof Guard IP detect settings
${dhcp} ${arp} get snoop setting ${nsx_mgr}
log to console "The state of DHCP is ${dhcp}"${\n}
log to console "The state of ARP is ${arp}"${\n}
please help.
Madhavan.S.S