Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

selenium - Using already opened Browser window in Robot framework

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...