Can robot framework keyword can be executed in python console?

泄露秘密 提交于 2020-01-06 22:43:56

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!