My sunroof is open and will not close. How do I troubleshoot the switch/motor on 2005 Kia Spectra

The switch does not work

Asked by for the 2005 Kia Spectra
trouble shooting would require a system description of operation , a wiring diagram , and points to check for continuity , voltage and ground signals. Or just unplug the motor (if accessible) and test for voltage signal at the harness connector. IF it's an external ground , make sure that is good.