Use a coded UI test to verify the functionality of the user interface of your application (Web/Windows Forms/Windows Presentation ...

Use a coded UI test to verify the functionality of the user interface of your application (Web/Windows Forms/Windows Presentation Foundation).
After you create a test, you can record user actions and generate code from these actions. Or, you can use an action recording to generate a coded UI test. Then you can add assertions using the UI Control Locator.