Exemple #1
0
 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 = {}
Exemple #2
0
 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 = {}
Exemple #3
0
    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}
Exemple #4
0
    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}
Exemple #5
0
    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}
Exemple #6
0
    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}
Exemple #7
0
    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}
Exemple #8
0
    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}
Exemple #9
0
 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)
Exemple #10
0
 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)
Exemple #11
0
 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)
Exemple #12
0
 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)