I'm trying to emulate the user actions to open and close an application using powershell. Using Sendkeys I'm able to navigate to the required tab in the dialog box. I would like to know how to capture the value of the element which is currently in focus and write it to a variable.
Expected output:
In the image, assume the TAB stroke has taken to the "FILE NAME" field. Now I would like read and store the value "Book1" in a variable $FILE_NAME for further processing.