def actions(main_window: asn1editor.wxPython.MainWindow):

    def get_children(window: wx.Window):
        my_children = window.GetChildren()
        if (my_children is not None):
            their_children = []
            for my_child in my_children:
                their_children += get_children(my_child)
            return (list(my_children) + their_children)
        else:
            return []
    sleep(1)
    key_codes = ([wx.WXK_TAB, wx.WXK_DOWN, wx.WXK_UP, wx.WXK_LEFT, wx.WXK_RIGHT, wx.WXK_SPACE] + [c for c in range(ord('1'), ord('9'))])
    ui_sim = wx.UIActionSimulator()
    for _ in range(1000):
        main_window.SetFocus()
        key_code = random.choice(key_codes)
        ui_sim.KeyDown(key_code)
        ui_sim.KeyUp(key_code)
    try:
        main_window.save_data_to_file('test.json')
    except asn1tools.ConstraintsError:
        pass
    main_window.Close(True)
    wx.GetApp().ExitMainLoop()
def actions(main_window: asn1editor.wxPython.MainWindow):

    def get_children(window: wx.Window):
        my_children = window.GetChildren()
        if (my_children is not None):
            their_children = []
            for my_child in my_children:
                their_children += get_children(my_child)
            return (list(my_children) + their_children)
        else:
            return []
    sleep(1)
    key_codes = ([wx.WXK_TAB, wx.WXK_DOWN, wx.WXK_UP, wx.WXK_LEFT, wx.WXK_RIGHT, wx.WXK_SPACE] + [c for c in range(ord('1'), ord('9'))])
    ui_sim = wx.UIActionSimulator()
    for _ in range(1000):
        main_window.SetFocus()
        key_code = random.choice(key_codes)
        ui_sim.KeyDown(key_code)
        ui_sim.KeyUp(key_code)
    try:
        main_window.save_data_to_file('test.json')
    except asn1tools.ConstraintsError:
        pass
    main_window.Close(True)
    wx.GetApp().ExitMainLoop()