In order to generate code for a coded UI test, the cursor must be within either a test method or property of a Coded UI Test ...