Question

I'm using Selenium2Library with robotframework 2.8.3 (python 2.7) when I run all testcases in a single go , there are like 600 images generated (both Passed and Failed test cases) but I don't want screenshot at all or at least not for passed test cases only for failed test cases.

Is that possible by including some keyword or by passing argument in pybot command or someother kind of settings?

something like $pybot --screenshot stop Testargs

Was it helpful?

Solution

To turn off screenshots on test failure, use the import option run_on_failure=Nothing when importing selenium2library. See the user guide, "Importing" section.

It shouldn't be taking screenshots on success. Do you have a default Teardown keyword defined in your top-level package, perhaps? Check out the results log to see how the screenshot is taken.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top