def create_new_vm_via_url(context, url): get_showing_node_name('New', context.app).click() context.app.child('Continue').click() context.app.child('Enter URL').click() context.execute_steps(u""" * Type "%s" """ %url ) context.app.child('Continue').click() if url.find('http') != -1: half_minutes = 0 while half_minutes < 120: half_minutes += 1 if context.app.findChild( GenericPredicate(name='Choose express install to automatically ' 'preconfigure the box with optimal settings.'), retry=False, requireResult=False): return create = context.app.child('Create') if create.sensitive and create.showing: create.click() break else: sleep(30)
def create_new_vm_via_file(context, location): path = location.split('/') get_showing_node_name('New', context.app).click() context.app.child('Continue').click() context.app.child('Select a file').click() for item in path: context.app.child(item).click() context.app.child('Open').click()
def press_back_in_vm(context, action, vm): panel = context.app.child(vm).children[0].findChildren(lambda x: x.roleName == 'panel' and x.showing)[0] buttons = panel.findChildren(lambda x: x.roleName == 'push button' and x.showing) if action == 'back': get_showing_node_name('Back', context.app).click() elif action == 'prefs': buttons[1].click() elif action == "Send key combinations": panel.child('Keyboard shortcuts').click() else: context.app.child(vm).child(action).click()
def create_new_vm_from_menu(context, sys_name): context.app.child('New').click() context.app.child('Continue').click() get_showing_node_name(sys_name, context.app).click()
def create_new_vm_from_menu(context, sys_name): context.app.child('New').click() get_showing_node_name(sys_name, context.app).click()
def create_new_vm_from_menu(context, sys_name): get_showing_node_name('New', context.app).click() get_showing_node_name(sys_name, context.app).click()