Exemple #1
0
 def init_resources(self, context):
     super(Applaunch, self).init_resources(context)
     loader = ExtensionLoader(packages=settings.extension_packages,
                              paths=settings.extension_paths)
     self.workload_params['markers_enabled'] = True
     self.workload = loader.get_workload(self.workload_name, self.device,
                                         **self.workload_params)
     self.init_workload_resources(context)
     self.package = self.workload.package
    def __init__(self, device, **kwargs):
        super(AppShare, self).__init__(device, **kwargs)
        self.deployable_assets = [self.test_image]
        self.clean_assets = True
        loader = ExtensionLoader()

        # Initialise googlephotos
        args_googlephotos = dict(kwargs)
        del args_googlephotos['test_image']
        del args_googlephotos['email_recipient']
        del args_googlephotos['skype_login_name']
        del args_googlephotos['skype_login_pass']
        del args_googlephotos['skype_contact_name']
        args_googlephotos['markers_enabled'] = False
        self.wl_googlephotos = loader.get_workload('googlephotos', device, **args_googlephotos)
        self.view += self.wl_googlephotos.view
        self.package.append(self.wl_googlephotos.package)

        # Initialise gmail
        args_gmail = dict(kwargs)
        del args_gmail['test_image']
        args_gmail['recipient'] = args_gmail.pop('email_recipient')
        del args_gmail['skype_login_name']
        del args_gmail['skype_login_pass']
        del args_gmail['skype_contact_name']
        args_gmail['markers_enabled'] = False
        self.wl_gmail = loader.get_workload('gmail', device, **args_gmail)
        self.view += self.wl_gmail.view
        self.package.append(self.wl_gmail.package)

        # Initialise skype
        args_skype = dict(kwargs)
        del args_skype['test_image']
        del args_skype['email_recipient']
        args_skype['login_name'] = args_skype.pop('skype_login_name')
        args_skype['login_pass'] = args_skype.pop('skype_login_pass')
        args_skype['contact_name'] = args_skype.pop('skype_contact_name')
        args_skype['markers_enabled'] = False
        self.wl_skype = loader.get_workload('skype', device, **args_skype)
        self.view += self.wl_skype.view
        self.package.append(self.wl_skype.package)
Exemple #3
0
    def init_resources(self, context):
        super(Applaunch, self).init_resources(context)
        loader = ExtensionLoader(packages=settings.extension_packages, paths=settings.extension_paths)
        self.workload_params['markers_enabled'] = True
        self.workload = loader.get_workload(self.workload_name, self.device,
                                            **self.workload_params)

        # This workload's uiauto apk will not be installed -- automation will be loaded directly form a path
        # so do not uninstall during teardown
        self.workload.uninstall_uiauto_apk = False
        self.init_workload_resources(context)
        self.package = self.workload.package