Depends a bit on the app in which you have it open.
See, for example:
Finding the File Path for the Front Document in the Front Application - Macro Library - Keyboard Maestro Discourse
For more information, see the wiki Searching the Forum for Answers section.