diff --git a/helium/__init__.py b/helium/__init__.py index b2c049b..b885e13 100644 --- a/helium/__init__.py +++ b/helium/__init__.py @@ -112,7 +112,8 @@ def start_firefox(url=None, headless=False, options=None, profile=None): profile.set_preference("network.proxy.socks_port", PROXY_PORT) profile.set_preference("network.proxy.socks_remote_dns", True) profile.set_preference("network.proxy.socks_version", 5) - profile.set_preference("network.proxy.no_proxies_on", "localhost, 10.20.30.40") + profile.set_preference("network.proxy.no_proxies_on", "localhost, + 10.20.30.40") USER_AGENT = "Mozilla/5.0 ..." profile.set_preference("general.useragent.override", USER_AGENT) start_firefox(profile=profile) diff --git a/helium/_impl/selenium_wrappers.py b/helium/_impl/selenium_wrappers.py index b0a6579..048afef 100644 --- a/helium/_impl/selenium_wrappers.py +++ b/helium/_impl/selenium_wrappers.py @@ -83,7 +83,8 @@ def f_decorated(self, *args, **kwargs): return f(self, *args, **kwargs) try: return f(self, *args, **kwargs) - except (StaleElementReferenceException, NoSuchElementException) as original_exc: + except (StaleElementReferenceException, NoSuchElementException) \ + as original_exc: try: frame_iterator = FrameIterator(self.target.parent) frame_iterator.switch_to_frame(self.frame_index) diff --git a/tests/unit/test__impl/test_selenium_wrappers.py b/tests/unit/test__impl/test_selenium_wrappers.py index d99b758..4bca8a6 100644 --- a/tests/unit/test__impl/test_selenium_wrappers.py +++ b/tests/unit/test__impl/test_selenium_wrappers.py @@ -1,4 +1,5 @@ -from helium._impl.selenium_wrappers import FrameIterator, FramesChangedWhileIterating +from helium._impl.selenium_wrappers import FrameIterator, \ + FramesChangedWhileIterating from selenium.common.exceptions import NoSuchFrameException from unittest import TestCase