Skip to content

Commit

Permalink
Refs #29883 -- Removed runtests.py's dependency on selenium.
Browse files Browse the repository at this point in the history
Regression in d207ac1.
  • Loading branch information
timgraham committed Nov 3, 2018
1 parent 6b7f1c2 commit 1c948e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions django/test/selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
import unittest
from contextlib import contextmanager

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

from django.test import LiveServerTestCase, tag
from django.utils.decorators import classproperty
from django.utils.module_loading import import_string
Expand Down Expand Up @@ -67,10 +64,12 @@ def import_webdriver(cls, browser):

@classmethod
def get_capability(cls, browser):
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
return getattr(DesiredCapabilities, browser.upper())

def create_webdriver(self):
if self.selenium_hub:
from selenium import webdriver
return webdriver.Remote(
command_executor=self.selenium_hub,
desired_capabilities=self.get_capability(self.browser),
Expand Down

0 comments on commit 1c948e5

Please sign in to comment.