diff --git a/integrations/docker/docker_setup.py b/integrations/docker/docker_setup.py index 96f200571ae..76a2d2f2e91 100755 --- a/integrations/docker/docker_setup.py +++ b/integrations/docker/docker_setup.py @@ -8,7 +8,7 @@ setup( name='seleniumbase', - version='1.1.25', + version='1.1.26', author='Michael Mintz', author_email='@mintzworld', maintainer='Michael Mintz', diff --git a/seleniumbase/plugins/base_plugin.py b/seleniumbase/plugins/base_plugin.py index 823fbc60537..214e346a2fb 100755 --- a/seleniumbase/plugins/base_plugin.py +++ b/seleniumbase/plugins/base_plugin.py @@ -11,6 +11,7 @@ from nose.plugins import Plugin from nose.exc import SkipTest from seleniumbase.config import settings +from seleniumbase.core import log_helper from seleniumbase.fixtures import constants, errors @@ -75,6 +76,24 @@ def beforeTest(self, test): test.test.data = self.options.data test.test.args = self.options + def __log_all_options_if_none_specified(self, test): + """ + When testing_base is specified, but none of the log options to save are + specified (basic_test_info, screen_shots, page_source), then save them + all by default. Otherwise, save only selected ones from their plugins. + """ + if ((not self.options.enable_plugin_basic_test_info) and + (not self.options.enable_plugin_screen_shots) and + (not self.options.enable_plugin_page_source)): + test_logpath = self.options.log_path + "/" + test.id() + log_helper.log_screenshot(test_logpath, test.driver) + log_helper.log_test_failure_data( + test_logpath, test.driver, test.browser) + log_helper.log_page_source(test_logpath, test.driver) + + def addFailure(self, test, err, capt=None): + self.__log_all_options_if_none_specified(test) + def addError(self, test, err, capt=None): """ Since Skip, Blocked, and Deprecated are all technically errors, but not @@ -87,6 +106,8 @@ def addError(self, test, err, capt=None): print err[1].__str__().split('''-------------------- >> ''' '''begin captured logging''' ''' << --------------------''', 1)[0] + else: + self.__log_all_options_if_none_specified(test) def handleError(self, test, err, capt=None): """ diff --git a/setup.py b/setup.py index 507f1dfa46f..8a42c98b72e 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='seleniumbase', - version='1.1.25', + version='1.1.26', url='https://github.com/mdmintz/SeleniumBase', author='Michael Mintz', author_email='@mintzworld',