Getting as a problem a parent object in my script
-
@jsulm
My kids claim that their problems with both parent objects lasted for approx. 18 years. Situation could be stabilised by migration to remote-objects, moving to different threads, associating with other objects and instantiating child-objects. Not sure though, if the issue at hand is similar. -
Detail LookupError: Object ':scrollView_Item_28' not ready: Quick item is clipped by a parent object /home/dev/Development/Repositories/apa_tests/global/steps/general.py:578
this is my problem, if you have a wish to help me you can contact me on mail.
gjovanovski18@yahoo.com
thank you -
-
@Goran_34
Please don’t divert to email conversation.
Give us a chance to help. Post your code and use the code tag to format it nicely. Ideally post a little, compilable reproducer. Start around general.py:578, as the error message suggests. -
@When("I '(enter|leave|close)' the '(menu|submenu|input field|burger menu entry)' '(.*)'", regexp = True)
def step(context, operation, structure, structure_name):
'''
Enter/leave specified structure (e.g. menu, submenu etc.)
or close current window.input: [string] operation: 'enter', 'leave' or 'close' [string] structure: 'menu', 'submenu' etc. [string] structure_name: e.g. 'system', 'diagnostics' etc. output: None ''' test.log('Interaction: %s %s %s via button tap' % (operation, structure, structure_name)) object_lookups = get_object_info_lookups() if __builtins__.type(structure_name) == str: structure_name = structure_name.lower() else: test.log('No type conversion needed') # for debug purpose only if structure_name == '': print('DEBUG: ') if operation == 'close': msg = 'Close settings menu' set_application_context('apa_compositor') object_name_raw = {"container": names.o_APACompositor_CompositorView, "radius": 0, "type": 'TopButton', "visible": True} btn_settings = waitForObject(object_name_raw, 2000) if btn_settings is None: raise UnboundLocalError('Settings button currently not accessible') try: tapObject(btn_settings) test.passes(msg) except (IOError, Exception) as e: test.log(repr(e)) test.fail(msg) elif operation == 'leave': msg = 'Leave %s %s' % (structure, structure_name) structure_name = structure_name.replace(' ', '_') if structure == 'burger menu entry': # enter object definition for applications option menu (faded in) # structure_name: e.g. CCI.Command_Tracks object_name_raw = "%s" % (structure_name) else: # structure: e.g. Menu or input field set_application_context('apa_settings') object_name_raw = {"container": names.view_de_agbrain_app_apa_settings_1_SettingsView, "id": 'backButton', "type": 'Button', "visible": True} btn_return = waitForObject(object_name_raw, 2000) if btn_return is None: raise UnboundLocalError('Return button currently not accessible') try: tapObject(btn_return) test.passes(msg) except (IOError, Exception) as e: test.log(repr(e)) test.fail(msg) if structure_name == 'app_management': goto_submenu_beginning('apa_settings', structure_name) elif structure_name == 'aerial_height' or structure_name == 'mounting_type_(tractor_settings)': goto_submenu_beginning('apa_config', structure_name) else: # operation: enter msg = 'Enter %s %s' % (structure, structure_name) structure = structure.replace(' ', '_') structure_name = structure_name.replace(' ', '_') key = '%s_%s' % (structure, structure_name) application_context = object_lookups[key]['application_context'] if structure == 'input_field': object_name_raw = {"type": "QQuickView", "unnamed": 1, "visible": True} application_context = "apa_compositor" else: # structure: e.g. submenu object_name_raw = object_lookups[key]['object_name_raw'] if structure == "submenu": if structure_name == "overlap": test.log("%s %s %s" % (operation, structure, structure_name)) test.log("old index: "+str(object_name_raw['index'])) if structure_name == "beds": test.log("%s %s %s" % (operation, structure, structure_name)) test.log("old index: "+str(object_name_raw['index'])) flicking = False # special case: when entering the ISOBUS settings (within Diagnostics) # the application context has to be apa_logmanager (not apa_settings) if structure_name == 'cci.control': application_context = 'apa_control' # note: to enter the following submenus you need to perform an extra flick if structure_name == 'isobus_settings' or structure_name == 'remote_view': view_list_raw = {"container": names.view_de_agbrain_app_apa_settings_1_SettingsView, "id": 'view', "type": 'ListView', "unnamed": '1', "visible": True} y_value = 300 flicking = True snooze(2) elif structure_name == 'beds' or structure_name == 'lightbar': view_list_raw = {"container": names.settings_de_agbrain_app_apa_command_1_scrollView_ScrollView_2, "id": "view", "type": "ListView", "visible": True} y_value = 300 flicking = True elif structure_name == 'CCI.Convert': view_list_raw = {"container": names.scrollView_ScrollView_2, "index": 2, "type": "Item", "visible": True} y_value = 300 flicking = True elif structure_name == 'gps_settings': view_list_raw = ConfigViewElements_MainView.flickable y_value = 300 flicking = True set_application_context(application_context) if flicking is True: view_list = waitForObject(view_list_raw, 5000) flick(view_list, 0, y_value) # for debug purpose only if key == '': print('DEBUG: ') object_name = waitForObject(object_name_raw, 5000) if object_name is None: raise UnboundLocalError('%s %s currently not accessible' % (structure, structure_name)) if structure == 'input_field': try: # additional parameter needed due to focus # (set to apa_compositor (complete wayland overlay)) tapObject(object_name, object_lookups[key]['x'], object_lookups[key]['y']) test.passes(msg) except (IOError, Exception) as e: test.log(repr(e)) test.fail(msg) else: try: tapObject(object_name) test.passes(msg) except (IOError, Exception) as e: test.log(repr(e)) test.fail(msg) # special cases: some actions take more time to perform if structure_name == 'taskdata_import': snooze(30) elif structure_name == 'tractor_settings': snooze(1) elif structure_name == 'field_boundary': snooze(4) elif structure_name == 'new_tractor_import': snooze(1) elif structure_name == 'implement_arrow': snooze(5) elif structure_name == 'aux_assignment': snooze(4) return None