• 请不要在回答技术问题时复制粘贴 AI 生成的内容
webnote
V2EX  ›  程序员

GetWindowText chrome 下获取不到alert内容

  •  
  •   webnote · May 12, 2012 · 4098 views
    This topic created in 5116 days ago, the information mentioned may be changed or developed.
    使用
    h = win32gui.FindWindowEx(None, None, None, 'Javascript 提醒')
    childh = win32gui.GetWindow(h, win32con.GW_CHILD)
    while childh:
    print win32gui.GetWindowText(childh)
    childh = win32gui.GetWindow(childh, 2)

    IE下能获取到 alert 窗口内容 (不是窗口标题)
    Chrome下获取不到

    有谁写过吗 求指教
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2837 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:26 · PVG 18:26 · LAX 03:26 · JFK 06:26
    ♥ Do have faith in what you're doing.