Pywinauto – COMErrorselect标签时

我最近有一个问题,当我在Excel文档中select特定的标签(表),我得到以下错误:

c:\python27\lib\site-packages\pywinauto\controls\uia_controls.pyc in select(self, item) 402 def select(self, item): 403 """Select a tab by index or by name""" --> 404 self._select(item) 405 return self 406 c:\python27\lib\site-packages\pywinauto\controls\uiawrapper.pyc in _select(self, item) 604 if item_index < len(list_): 605 wrp = list_[item_index] --> 606 wrp.iface_selection_item.Select() 607 else: 608 raise IndexError("item not found") COMError: (-2147467263, 'Not implemented', (None, None, None, 0, None)) 

这是代码:

 app = pywinauto.Application(backend="uia").connect(process=43800) tab_list = app.top_window().descendants(control_type="Tab") tab_menu = tab_list[1] tab_menu.select(1) 

Excel文档有多张纸。
选项卡窗口是“ uia_controls.TabControlWrapper – Sheet1”,TabControl,3527539 “。

看来,方法: get_selected_tab()tab_count()的工作。 所以唯一的问题是实际上应该select标签的“ select() ”方法。

我已经testing了多个Excel文件,并在不同的环境(python2.7,Windows 10和Windows 2016,有和没有pipe理员权限)

这里可能是什么问题? 有没有一个解决scheme或解决这个问题?

谢谢。