Commit d4e7a3d2 authored by Jérome Perrin's avatar Jérome Perrin

ERP5TypeFunctionalTestCase: use new selenium API

parent 73014b1a
...@@ -276,9 +276,7 @@ class FunctionalTestRunner: ...@@ -276,9 +276,7 @@ class FunctionalTestRunner:
kw.update( kw.update(
firefox_binary=firefox_bin, firefox_binary=firefox_bin,
executable_path=geckodriver, executable_path=geckodriver,
# BBB in selenium 3.8.0 this option was named log_path service_log_path=os.path.join(log_directory, 'geckodriver.log'),
log_path=os.path.join(log_directory, 'geckodriver.log'),
# service_log_path=os.path.join(log_directory, 'geckodriver.log'),
) )
browser = webdriver.Firefox(**kw) browser = webdriver.Firefox(**kw)
else: else:
...@@ -363,11 +361,11 @@ class FunctionalTestRunner: ...@@ -363,11 +361,11 @@ class FunctionalTestRunner:
# need to wait a bit more, because at the end of test ( testComplete ), # need to wait a bit more, because at the end of test ( testComplete ),
# updateSuiteWithResultOfPreviousTest is called by setTimeout. We want to # updateSuiteWithResultOfPreviousTest is called by setTimeout. We want to
# wait for the last test (which is the last td) result table to be present # wait for the last test (which is the last td) result table to be present
browser.switch_to_frame('testSuiteFrame') browser.switch_to.frame('testSuiteFrame')
WebDriverWait(browser, 10).until(EC.presence_of_element_located(( WebDriverWait(browser, 10).until(EC.presence_of_element_located((
By.XPATH, '//table/tbody/tr/td[last()]//table' By.XPATH, '//table/tbody/tr/td[last()]//table'
))) )))
browser.switch_to_default_content() browser.switch_to.default_content()
self.execution_duration = round(time.time() - start_time, 2) self.execution_duration = round(time.time() - start_time, 2)
html_parser = etree.HTMLParser(recover=True) html_parser = etree.HTMLParser(recover=True)
iframe = etree.fromstring( iframe = etree.fromstring(
......
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