Pywinauto menu_select和click功能不适用于我办公室的应用程序

时间:2017-06-09 11:09:20

标签: pywinauto

    .leftimage img {max-height: 100%; width: auto; max-width: 100%; height: auto;}

    .enlargehover{
    position: fixed;
    top: 0px;
    left: 300px;
    display: none;
    margin:  1vw 3%;
    height: 98%;
    z-index: 8;
    } 

    .imagetotal a {display: block!important;}
    .imagetotal:hover .enlarge {display: block!important;}

1 个答案:

答案 0 :(得分:2)

好的,如果这是Qt5应用,WireShark example at lines 58-63可以帮助您调整应用的代码。它应该是这样的:

import time
from pywinauto.application import Application

# Run a target application
app = Application(backend='uia').start(r"C:\ProgramFiles\BatonMediaPlayer\BatonMediaPlayer.exe")
time.sleep(5)

win = app['Dialog'] # or app.ApproximateMainWindowTitle
win['Help'].select() # exapnd submenu
submenu = app[''] # Dropdown submenu is a top-level window
submenu['About'].select() # or .click_input()

希望它的工作方式与WireShark相同。