How to record test cases with robotframework?

不羁的心 提交于 2020-01-14 02:47:11

问题


I recently started using robotframework with the Selenium2Library. I haven't tested using Selenium before, but I know it is possible to record tests using Selenium. In RobotFramework, it says, "it is not possible". I mean even for a simple login test, I need to write the test, specifying the id of username, password and submit button.

However, is there any way by which these tests can be recorded using robotframework? such as clicking on a text box, entering a string and then clicking on submit button etc., and automatically generate the test case source code instead of having me to write the test cases.
Is this possible with robotframework or any external library that it supports?


回答1:


robotframework wasn't designed to be a record-and-play tool, and has nothing built-in to support that.

There was someone who wrote a selenium IDE plugin that would generate robot keywords, but that was years ago. The github repository is here: https://github.com/denschu/selenium-ide-format-robotframework

The code hasn't been touched since 2012, so I doubt it's of much use.




回答2:


Using this Firefox add-on, FireRobot we can generate most of the code and also using this you can select the elements on the screen and get related code suggestions on right click like
Wait Until Element Is Visible
Click Element
and all operations to perform on the selected element.



来源:https://stackoverflow.com/questions/33896990/how-to-record-test-cases-with-robotframework

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