edit capabilities for sauce labs

This commit is contained in:
Churikova Tetiana 2018-03-13 10:21:30 +02:00
parent 7fd41495d5
commit 87016df2df
1 changed files with 7 additions and 3 deletions

View File

@ -18,6 +18,8 @@ class BaseTestCase:
sauce_lab_cap = dict() sauce_lab_cap = dict()
sauce_lab_cap['name'] = test_data.test_name sauce_lab_cap['name'] = test_data.test_name
sauce_lab_cap['build'] = pytest.config.getoption('build') sauce_lab_cap['build'] = pytest.config.getoption('build')
sauce_lab_cap['idleTimeout'] = 900
sauce_lab_cap['commandTimeout'] = 500
sauce_lab_cap['platform'] = "MAC" sauce_lab_cap['platform'] = "MAC"
sauce_lab_cap['browserName'] = 'Chrome' sauce_lab_cap['browserName'] = 'Chrome'
sauce_lab_cap['screenResolution'] = '2048x1536' sauce_lab_cap['screenResolution'] = '2048x1536'
@ -67,8 +69,9 @@ class BaseTestCase:
if cls.environment == 'sauce': if cls.environment == 'sauce':
for caps in cls.capabilities_dev, cls.capabilities_org: for caps in cls.capabilities_dev, cls.capabilities_org:
cls.get_remote_caps(cls) remote = cls.get_remote_caps(cls)
new_caps = caps.to_capabilities() new_caps = caps.to_capabilities()
new_caps.update(remote)
driver = webdriver.Remote(cls.executor_sauce_lab, driver = webdriver.Remote(cls.executor_sauce_lab,
desired_capabilities=new_caps) desired_capabilities=new_caps)
drivers.append(driver) drivers.append(driver)
@ -79,6 +82,7 @@ class BaseTestCase:
cls.driver_dev = drivers[0] cls.driver_dev = drivers[0]
cls.driver_org = drivers[1] cls.driver_org = drivers[1]
for driver in drivers: for driver in drivers:
driver.implicitly_wait(10) driver.implicitly_wait(10)
@ -132,9 +136,9 @@ class BaseTestCase:
remove_installation(cls.driver_org) remove_installation(cls.driver_org)
######DEV ######DEV
cls.github_dev.delete_fork()
cls.github_dev.clean_repo_local_folder() cls.github_dev.clean_repo_local_folder()
cls.github_dev.delete_fork()
try: try:
cls.driver_dev.quit() cls.driver_dev.quit()
cls.driver_org.quit() cls.driver_org.quit()