问题
I am using robot framework for writing test case. As it is not possible to debug the each and every statement, logging is only way which makes it very slow to develop test case.
I am looking for a way in i can execute the robot keyword in python console. so that I can debug and see if the keyword i have created or inbuilt keyword that i have used will work correctly. Is there a way to do it ?
eg. Can i execute wait until page contains element ${ELEMENT}
?
回答1:
Try following plugin on eclipse IDE, it allows you to put a break point and execute step by step.
The last time I checked (couple of months back) it was having few issue with importing existing project and running. I hope they all have been fixed.
https://github.com/nokia/RED
回答2:
With RED Robot Editor (based on Eclipse) you can run your Robot testcases with debugger. This works the same as other IDE debugger - place breakpoint on executable row (line which consists RF keywords as this is limitation from Robot itself), than you can use step into,step over,variable view&change etc.
If you need to run debugger on Robot and Python level you can use PyDevD (pydev debugger) for python part.
Robot debug: http://nokia.github.io/RED/help/user_guide/launching/debug.html
Robot&Python debug: http://nokia.github.io/RED/help/user_guide/launching/robot_python_debug.html
来源:https://stackoverflow.com/questions/43974104/can-robot-framework-keyword-can-be-executed-in-python-console