diff --git a/src/sst/__init__.py b/src/sst/__init__.py index 28908e3..8eafcbb 100644 --- a/src/sst/__init__.py +++ b/src/sst/__init__.py @@ -18,7 +18,7 @@ # -__version__ = '0.2.9.5' +__version__ = '0.2.9.6' DEVSERVER_PORT = 8120 # django devserver for internal acceptance tests diff --git a/src/sst/actions.py b/src/sst/actions.py index f12da9b..2699d5e 100644 --- a/src/sst/actions.py +++ b/src/sst/actions.py @@ -1790,3 +1790,7 @@ def get_element_source(id_or_elem): """ elem = _get_elem(id_or_elem) return elem.get_attribute('innerHTML') + + +def get_browser_log(): + return _test.browser.get_log('browser') diff --git a/src/sst/browsers.py b/src/sst/browsers.py index f45f442..b4dea7f 100644 --- a/src/sst/browsers.py +++ b/src/sst/browsers.py @@ -26,6 +26,7 @@ from selenium import webdriver from selenium.common import exceptions as selenium_exceptions from selenium.webdriver.common import utils +from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.firefox import ( firefox_binary, webdriver as ff_webdriver, @@ -83,6 +84,11 @@ class ChromeFactory(BrowserFactory): webdriver_class = webdriver.Chrome + def browser(self): + desired = DesiredCapabilities.CHROME + desired['loggingPrefs'] = { 'browser':'ALL' } + return self.webdriver_class(self.profile, capabilities=desired) + # MISSINGTEST: Exercise this class (requires windows) -- vila 2013-04-11 class IeFactory(BrowserFactory): @@ -94,7 +100,7 @@ class IeFactory(BrowserFactory): class PhantomJSFactory(BrowserFactory): webdriver_class = webdriver.PhantomJS - + def browser(self): return self.webdriver_class(service_args=['--ignore-ssl-errors=true']) @@ -209,7 +215,9 @@ def setup_for_test(self, test): self.profile = profile def browser(self): - return self.webdriver_class(self.profile) + desired = DesiredCapabilities.FIREFOX + desired['loggingPrefs'] = { 'browser':'ALL' } + return self.webdriver_class(self.profile, capabilities=desired) # MISSINGTEST: Exercise this class -- vila 2013-04-11