The default path when in the editor is the project folder and not the Assets folder. Check the project folder for the test.png file. Also make sure when you take the screenshot that the Game view is visible, because if not there is no source to take the screenshot from.