Ugh
The S2L (assuming that we are talking about python version) Run On
Failure feature, which is done by a decorator and a with meta class,
is quite neat feature. The Run On Failure feature [2] code itself,
contains at first glimpse some magical code [3], where one has do
understand quite a lot of python internals before, one can
understand how the magic converts to understanding. And do not ask
from me, I have not yet converted all to magic to understanding :-)
One can start by reading from the Robot Framework user guide [1]
explanation and links how to use decorators with Robot Framework.
That being said and without seeing your code, I would ques that you
call S2L library keyword in your code. And that keyword fails and
the failure triggers Run On Failure functionality (on S2L library),
which on default takes a screen capture. But the good news is, you
can suppress the Run On Failure, see details from Register Keyword
To Run On Failure [2] keyword.
-Tatu
[1]
http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#using-decorators
[2]
http://rtomac.github.io/robotframework-selenium2library/doc/Selenium2Library.html#Register%20Keyword%20To%20Run%20On%20Failure
[3]
https://github.com/rtomac/robotframework-selenium2library/blob/master/src/Selenium2Library/keywords/keywordgroup.py