TT#70901 selenium: fix customer creation on pro machines with cloudpbx enabled

Some pro machines that are used for running tests have cloudpbx enabled and
when trying to create a customer on those it will fail, because it wont
select the product at all. this patch will select basic sip account as product
if cloudpbx is enabled

Change-Id: I15abe159e1be116ac6247ba471e1f26b48f50842
changes/96/40996/3
Nico Schedel 5 years ago
parent 4c3f090a0e
commit f65b85b64b

@ -52,6 +52,17 @@ def create_customer(driver, name=None):
driver, '//*[@id="contactidtable"]//tr[1]//td/input') driver, '//*[@id="contactidtable"]//tr[1]//td/input')
driver.find_element_by_xpath( driver.find_element_by_xpath(
'//*[@id="contactidtable"]//tr[1]//td/input').click() '//*[@id="contactidtable"]//tr[1]//td/input').click()
try:
driver.implicitly_wait(2)
Functions.scroll_to_element(driver, '//*[@id="productidtable_filter"]/label/input')
Functions.fill_element(driver, '//*[@id="productidtable_filter"]/label/input', 'thisshouldnotexist')
driver.find_element_by_css_selector('#productidtable tr > td.dataTables_empty')
Functions.fill_element(driver, '//*[@id="productidtable_filter"]/label/input', 'Basic')
driver.find_element_by_xpath('//*[@id="productidtable"]//tr[1]//td/input').click()
driver.implicitly_wait(10)
except Exception as e:
driver.implicitly_wait(10)
del e
Functions.scroll_to_element( Functions.scroll_to_element(
driver, '//*[@id="billing_profileidtable"]//tr[1]//td/input') driver, '//*[@id="billing_profileidtable"]//tr[1]//td/input')
driver.find_element_by_xpath( driver.find_element_by_xpath(

@ -46,6 +46,8 @@ def preparation():
driver.quit() driver.quit()
except Exception: except Exception:
driver.save_screenshot('/results/preperation.png') driver.save_screenshot('/results/preperation.png')
driver.quit()
raise Exception
def cleanup(): def cleanup():

Loading…
Cancel
Save