大佬教程收集整理的这篇文章主要介绍了无法使用 pywinauto 脚本单击菜单栏,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这个问题与之前提出的问题 here 有关。但是这个查询是针对另一个屏幕的。我尝试了上一个问题中经过验证的解决方案,但没有选择菜单。但是,如果我使用 draw_outline()
它会在菜单框区域之外绘制轮廓。在打印 control_IDentifIEr 我得到以下文本 ['_BaseWrapper__repr_texts','__abstractmethods__','__class__','__delattr__','__Dict__','__dir__','__doc__','__eq__','__format__','__ge__','__getattribute__','__gt__','__hash__','__init__','__init_subclass__','__le__','__lt__','__module__','__ne__','__new__','__reduce__','__reduce_ex__','__repr__','__setattr__','__sizeof__','__str__','__subclasshook__','__weakref__','_abc_impl','_as_parameter_','_cache','_calc_click_coords','_control_types','_create_wrapper','_element_info','_needs_image_prop','_scroll_types','_SELEct','_texts_from_item_container','actions','apPDAta','automation_ID','BACkend','can_be_label','can_SELEct_multiple','capture_as_image','children','children_texts','class_name','click_input','clIEnt_to_screen','close','collapse','control_count','control_ID','descendants','double_click_input','drag_mouse_input','draw_outline','element_info','expand','frIEndly_class_name','frIEndlyclassname','from_point','get_expand_state','get_propertIEs','get_SELEction','get_show_state','handle','has_keyboard_focus','has_title','iface_expand_collapse','iface_grID','iface_grID_item','iface_invoke','iface_item_container','iface_range_value','iface_scroll','iface_scroll_item','iface_SELEction','iface_SELEction_item','iface_table','iface_table_item','iface_text','iface_toggle','iface_transform','iface_transformV2','iface_value','iface_virtualized_item','iface_window','invoke','is_active','is_child','is_collapsed','is_dialog','is_enabled','is_expanded','is_keyboard_focusable','is_maximized','is_minimized','is_normal','is_SELEcted','is_SELEction_required','is_visible','iter_children','iter_descendants','legacy_propertIEs','maximize','menu_SELEct','minimize','move_mouse_input','parent','press_mouse_input','process_ID','rectangle','ref','release_mouse_input','restore','right_click_input','root','scroll','SELEct','SELEcted_item_index','set_focus','texts','top_from_point','top_level_parent','type_keys','verify_actionable','verify_enabled','verify_visible','wait_for_IDle','was_maximized','wheel_mouse_input','window_text','windowclasses','writable_props']
我尝试使用 @H_757_3@menu_SELEct('\SALEs') but doesn't work either throws error file "C:\Users***\ApPDAta\Local\Programs\Python\python39-32\lib\site-packages\pywinauto\控件\uiawrapper.py”,第 721 行,在 menu_SELEct 中
引发 AttributeError
属性错误`
我在点击菜单之前和点击菜单后添加了屏幕片段。
这是使用的代码 `
app = Application(BACkend="uia").connect(class_name="TFMenuG.UnicodeClass")
dlg = app['Dialog']
handle = dlg.child_window(title="SérIE 1",control_type="Pane")
handle.child_window(control_type="Pane",found_index=1).draw_outline()
handle.child_window(control_type="Pane",found_index=1).menu_SELEct(u'\SALEs')
`
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
以上是大佬教程为你收集整理的无法使用 pywinauto 脚本单击菜单栏全部内容,希望文章能够帮你解决无法使用 pywinauto 脚本单击菜单栏所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。