Python - why its not able to find the window title?
<p>I have following code and its unable to activate the window title "Stack Overflow" and sending the f11 to wrong GUI. </p>

<p>Is this a Python bug? Why its not working?</p>

<pre><code>import subprocess
from subprocess import Popen
import win32com.client as comctl
import time

def chromes():
  url='https://stackoverflow.com'
  cmd='C:/Users/tpt/AppData/Local/Chromium/Application/chrome.exe'
  Popen([cmd, url, '--window-position=0,0', '--user-data-dir=C:\\iplay'])

chromes()
time.sleep(5)

wsh =comctl.Dispatch("WScript.Shell")
aa = wsh.AppActivate("Stack Overflow")
wsh.SendKeys("{F11}")
</code></pre>

<p>Like this :</p>

<pre><code>import win32gui
import win32api
import win32con

def enumHandler(hwnd, lParam):
    if win32gui.IsWindowVisible(hwnd):
        if 'Stack Overflow' in win32gui.GetWindowText(hwnd):
            win32api.PostMessage(hwnd, win32con.WM_KEYDOWN, win32con.VK_F11, 0)


win32gui.EnumWindows(enumHandler, None)
</code></pre>

<p>But no idea about which tab effected ?</p>

python windows google-chrome chromium