title: List of open browser tabs programmatically
body: <p>Is there a way to programmatically obtain a <strong>list of open tabs in a browser</strong> by index?</p>
  <p>For example, suppose Google Chrome is open with two tabs.<br />
  In the program, a line something like:</p>
  <pre><code>tabs_list = list_tabs(hwnd)
  </code></pre>
  <p>...where hwnd is the handle to the window for the overall Chrome instance and tabs_list is a dictionary something like:</p>
  <pre><code>{
    0 : 'http://stackoverflow.com/',
    1 : 'http://www.otherstufff.com/'
  }
  </code></pre>
  <p>(...or maybe by title of the window instead of url)</p>
  <p><em>If so, then bringing focus to one of them can be possible from the Python script with keyboard commands, control- (CTRL-) like control-1 or control-2.</em></p>
  <hr />
  <p>An edit added later to try to help clarify:  Picture a local wxPython app, where you already know how to activate a given instance of Chrome on that same box from within your wxPython app running locally, and that browser instance has multiple tabs open, and now you want to insure that a certain tab has focus, to be able to interact with that web page that is being displayed (maybe using CTRL-A CTRL-C for example to harvest its content).  This question is not about issuing keyboard commands, that is already known, the question is how to obtain a list of open tabs, if possible, thanks.</p>