Disabling screen capture?

372 views
Skip to first unread message

Kevin Burton

unread,
Nov 26, 2014, 11:35:23 AM11/26/14
to robotframe...@googlegroups.com
I am running a test script (using Selenium2Library) that seems to work but it captures the screen about 13 times during the test run. I could not see any errors that would cause this automatic screen dump. I have added some python code. Do I need to explicitly return a success code? If so what is it? Thank you.

Kevin

Kevin Burton

unread,
Nov 26, 2014, 1:50:27 PM11/26/14
to robotframe...@googlegroups.com
I found that the screen dump happens after the code does
try:
    ....
except AssertError:
    return

Do I need to somehow clear the error? I also notice that the screen dump is still triggered but if I try to log the error using Python's logging module the log.html contains [WARN] each time that the exception happens.

Thank you.

Kevin

Tatu Aalto

unread,
Nov 26, 2014, 3:00:27 PM11/26/14
to ronald.ke...@gmail.com, robotframe...@googlegroups.com
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
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages