robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

Possibility to set log level to potentially big messages by `Page Should Contain` #100

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by Magnus.Smedberg on 25 Feb 2010

When the keyword "Page Should Contain" fails, it will log the entire webpage's html code in the log (and report) of RF.

Since a lot of webpages contain a lot of html source, the log of a failing case can become quite large. And if there are more than a few cases that fail, the log quickly becomes very large.

To me, it makes more sense to log this at DEBUG level instead. That way, you can still get it if you want it.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 26 Feb 2010

Probably the best idea is to make it possible to set the log level as an optional argument. INFO might still be a good default value.

spooning commented 9 years ago

Originally submitted to Google Code by @khusa on 28 Feb 2010

Implemented in r449.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 1 Mar 2010

This was implemented by adding the log level.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 1 Mar 2010

Hmm, the new argument isn't documented. Could you still add that?

spooning commented 9 years ago

Originally submitted to Google Code by @khusa on 1 Mar 2010

Yes we can. Documentation added in r454.

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 2 Mar 2010

I enhanced the doc slightly in r455.

I also noticed that other Page Should Contain X keywords have optional message argument. Should we add that to this keyword too? If yes, and we want the signature to be test, message=, level='INFO', we should add it now.