def make_saucelabs_desired_capabilities():
 desired_capabilities = settings.SAUCE.get('BROWSER', DesiredCapabilities.CHROME)
 desired_capabilities['platform'] = settings.SAUCE.get('PLATFORM')
 desired_capabilities['version'] = settings.SAUCE.get('VERSION')
 desired_capabilities['device-type'] = settings.SAUCE.get('DEVICE')
 desired_capabilities['name'] = settings.SAUCE.get('SESSION')
 desired_capabilities['build'] = settings.SAUCE.get('BUILD')
 desired_capabilities['video-upload-on-pass'] = False
 desired_capabilities['sauce-advisor'] = False
 desired_capabilities['capture-html'] = True
 desired_capabilities['record-screenshots'] = True
 desired_capabilities['selenium-version'] = '2.34.0'
 desired_capabilities['max-duration'] = 3600
 desired_capabilities['public'] = 'public restricted'
 return desired_capabilities

def make_saucelabs_desired_capabilities ( ) : desired_capabilities = settings . SAUCE . get ( 'BROWSER' , DesiredCapabilities . CHROME ) desired_capabilities [ 'platform' ] = settings . SAUCE . get ( 'PLATFORM' ) desired_capabilities [ 'version' ] = settings . SAUCE . get ( 'VERSION' ) desired_capabilities [ 'device-type' ] = settings . SAUCE . get ( 'DEVICE' ) desired_capabilities [ 'name' ] = settings . SAUCE . get ( 'SESSION' ) desired_capabilities [ 'build' ] = settings . SAUCE . get ( 'BUILD' ) desired_capabilities [ 'video-upload-on-pass' ] = False desired_capabilities [ 'sauce-advisor' ] = False desired_capabilities [ 'capture-html' ] = True desired_capabilities [ 'record-screenshots' ] = True desired_capabilities [ 'selenium-version' ] = '2.34.0' desired_capabilities [ 'max-duration' ] = 3600 desired_capabilities [ 'public' ] = 'public restricted' return desired_capabilities
returns a desiredcapabilities object corresponding to the environment sauce parameters .