Using already opened Browser window in Robot framework

好久不见. 提交于 2019-12-02 22:07:29

问题


We are using Robot Framework for writing/automating acceptance test cases.

Every time i need to run the whole script to check the last lines of code of my script, That Wastes lot of time and creates lots of duplicate records in the system, i just wanted to avoid re-running whole script to check last lines of code and resume the execution from the point where it erred in previous run.

That is to say;If the test run throws error; it will not just close the browser window; And next run will use the same browser window with next command in sequence after which it had failed in last run.


回答1:


What you ask is not directly possible with Robot/Selenium, but from what you write, I can see room for some improvements:

  • "creates lots of duplicate records in the system" => you should have Teardown in your tests that clean the system when the tests are finished (and teardown are run even when there is a failure). So next time you run the tests, the system starts clean
  • "That Wastes lot of time" => if your tests are too long to run, maybe you should consider splitting them in smaller chunks. And also consider running part of your tests directly via the REST or SOAP interface instead of the browser.


来源:https://stackoverflow.com/questions/41447840/using-already-opened-browser-window-in-robot-framework

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