On an Apple, OS X system, the following AppleScript script will display the titles for the currently open windows in Firefox.
tell application "Firefox" set windowTitles to "" repeat with w in (every window whose visible is true) set windowTitles to windowTitles & " " & " " & name of w end repeat display dialog windowTitles end tell
E.g., if I have 3 Firefox windows open, one of which has multiple tabs open, I might see something like the following:
The first window title displayed is for a Firefox window with 9 tabs open, but only the title for the currently selected tab "After sticking a land-based return, SpaceX will try the ocan again | Ars Technica" is displayed.
Note: putting an ending double quote on the line below the opening one results in a new line.