Apply a cycloplegic such as atropine to the eye to force the eye muscles to relax and focus as far away as possible. Then use a retinoscope to shine light on the retina and observe it while adjusting lenses over the eye.
And of course slightly older babies have ways of communicating without words! https://youtube.com/watch?v=84-Cuc-Tz2o