def __init__(self, environment): self.env = environment self.udid = propertyFromString('deviceName', self.env) self.platform = propertyFromString('platform', self.env) self.device = getDeviceInfo(self.udid, self.platform) self.options = {} self.caps = {}
def desiredCaps(self, mustard=True): self.options['provider'] = 'gridMobileWeb' self.options['manufacturer'] = self.device['manufacturer'] self.options['model'] = self.device['model'] self.options['osv'] = self.device['osv'] self.options['mustard'] = mustard self.options['deviceName'] = self.displayString() self.caps['platform'] = propertyFromString('platform', self.env) self.caps['platformName'] = 'iOS' if propertyFromString('platform', self.env) == 'MAC' else 'Android' self.caps['browserName'] = propertyFromString('browserName', self.env) self.caps['udid'] = self.device['udid'] self.caps['deviceName'] = self.device['udid'] self.caps['applicationName'] = self.device['udid'] return {'desiredCaps': self.caps, 'options': self.options}
def desiredCaps(self, mustard=True): self.options['provider'] = 'gridMobileWeb' self.options['manufacturer'] = self.device['manufacturer'] self.options['model'] = self.device['model'] self.options['osv'] = self.device['osv'] self.options['mustard'] = mustard self.options['deviceName'] = self.displayString() self.caps['platform'] = propertyFromString('platform', self.env) self.caps['platformName'] = 'iOS' if propertyFromString( 'platform', self.env) == 'MAC' else 'Android' self.caps['browserName'] = propertyFromString('browserName', self.env) self.caps['udid'] = self.device['udid'] self.caps['deviceName'] = self.device['udid'] self.caps['applicationName'] = self.device['udid'] return {'desiredCaps': self.caps, 'options': self.options}
def desiredCaps(self, mustard=True): self.options['provider'] = 'gridWeb' self.options['manufacturer'] = propertyFromString('platform', self.env) self.options['model'] = propertyFromString('browserName', self.env) self.options['osv'] = 'Local' self.options['mustard'] = mustard self.options['deviceName'] = self.displayString() self.caps['platformName'] = propertyFromString('platform', self.env) self.caps['browserName'] = propertyFromString('browserName', self.env) self.caps['udid'] = self.displayString() self.caps['deviceName'] = self.displayString() self.caps['version'] = propertyFromString('version', self.env) if self.caps['browserName'].lower() == 'firefox' and int(self.caps['version']) >= 48: self.caps['marionette'] = True else: self.caps['marionette'] = False return {'desiredCaps': self.caps, 'options': self.options}
def desiredCaps(self, mustard=True): self.options['provider'] = 'gridMobile' self.options['manufacturer'] = self.device['manufacturer'] self.options['model'] = self.device['model'] self.options['osv'] = self.device['osv'] self.options['mustard'] = mustard self.options['deviceName'] = self.displayString() #self.caps['browserName'] = self.device['udid'] if propertyFromString('platform', self.env).capitalize() == 'Mac': platform = 'IOS' else: platform = propertyFromString('platform', self.env).capitalize() self.caps['platformName'] = platform self.caps['applicationName'] = self.device['udid'] self.caps['udid'] = self.device['udid'] self.caps['deviceName'] = self.device['name'] return {'desiredCaps': self.caps, 'options': self.options}
def desiredCaps(self, mustard=True): self.options['provider'] = 'gridWeb' self.options['manufacturer'] = propertyFromString('platform', self.env) self.options['model'] = propertyFromString('browserName', self.env) self.options['osv'] = 'Local' self.options['mustard'] = mustard self.options['deviceName'] = self.displayString() self.caps['platformName'] = propertyFromString('platform', self.env) self.caps['platform'] = propertyFromString('platform', self.env) self.caps['browserName'] = propertyFromString('browserName', self.env) self.caps['udid'] = self.displayString() self.caps['deviceName'] = self.displayString() self.caps['version'] = propertyFromString('version', self.env) if self.caps['browserName'].lower() == 'firefox' and int(self.caps['version']) >= 48: self.caps['marionette'] = True else: self.caps['marionette'] = False return {'desiredCaps': self.caps, 'options': self.options}
def displayString(self): platform = propertyFromString('platform', self.env) browser = propertyFromString('browserName', self.env) osv = propertyFromString('version', self.env) return "%s -- %s -- %s" % (platform, browser, osv)
def displayString(self): platform = self.device['platform'] udid = self.device['udid'] name = self.device['name'] browser = propertyFromString('browserName', self.env) return "%s -- %s -- %s -- %s" % (platform, udid, name, browser)