[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Support chromedriver installed in /usr/lib/chromium-browser



Thanks, merged.

On Wed, 01 Nov 2017, Ville Skyttä wrote:
> Ubuntu ships it there.
> ---
>  functional_tests/tests.py | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/functional_tests/tests.py b/functional_tests/tests.py
> index b165c93..1600f39 100644
> --- a/functional_tests/tests.py
> +++ b/functional_tests/tests.py
> @@ -47,7 +47,10 @@ class SeleniumTestCase(LiveServerTestCase):
>      def setUp(self):
>          os.environ['NO_PROXY'] = 'localhost,127.0.0.1,127.0.1.1'
>  
> -        chromedriver = "/usr/lib/chromium/chromedriver"
> +        for path in "/usr/lib/chromium-browser", "/usr/lib/chromium":
> +            chromedriver = os.path.join(path, "chromedriver")
> +            if os.path.exists(chromedriver):
> +                break
>          os.environ["webdriver.chrome.driver"] = chromedriver
>          self.browser = webdriver.Chrome(chromedriver)
>          self.browser.implicitly_wait(3)
> -- 
> 2.14.1
> 

-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/


Reply to: