Commit 2087dff9 authored by Jérome Perrin's avatar Jérome Perrin

test

parent 060cb34e
......@@ -125,7 +125,7 @@ class BrowserCompatibilityMixin(WebServerMixin):
desired_capabilities=self.desired_capabilities)
def tearDown(self):
self.driver.close()
self.driver.quit()
super(BrowserCompatibilityMixin, self).tearDown()
def test_user_agent(self):
......@@ -173,7 +173,7 @@ class SeleniumServerTestCase(SlapOSInstanceTestCase):
return (os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'software.cfg')), )
class TestBrowserSelection(SeleniumServerTestCase, WebServerMixin):
class TestBrowserSelection(WebServerMixin, SeleniumServerTestCase):
def test_firefox(self):
parameter_dict = self.computer_partition.getConnectionParameterDict()
webdriver_url = parameter_dict['url']
......@@ -235,19 +235,18 @@ class TestBrowserSelection(SeleniumServerTestCase, WebServerMixin):
def test_parralel_connections(self):
parameter_dict = self.computer_partition.getConnectionParameterDict()
webdriver_url = parameter_dict['url']
return
queue = multiprocessing.Queue()
def _test(q, server_url):
driver = webdriver.Remote(
command_executor=webdriver_url,
desired_capabilities=DesiredCapabilities.FIREFOX)
# XXX we need to sleep a bit to wait for browser to be ready before using it, otherwise selenium crash
sleep(2)
driver.get(server_url)
q.put(driver.title == 'Test page')
driver.quit()
# XXX
desired_capabilities= dict(DesiredCapabilities.FIREFOX, version='52.9.0esr')) #DesiredCapabilities.FIREFOX)
try:
driver.get(server_url)
q.put(driver.title == 'Test page')
finally:
driver.quit()
nb_workers = 10
workers = []
......@@ -281,9 +280,10 @@ class TestChrome69(BrowserCompatibilityMixin, SeleniumServerTestCase):
user_agent = 'Chrome/69.0.3497.0'
#del TestFirefox52
del TestChrome69
del TestFirefox52
del TestFirefox60
del TestBrowserSelection
#del TestBrowserSelection
# more test:
# XXX run ERP5 test !
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment