If you have started praying before sunrise then you should complete the fajr prayer even if the sun is rising in between the prayer. Otherwise you should wait for the sun to rise and then start prayer after sun has completely risen. ... But if you woke up at the time of sunrise. Then you can pray fajar at that time.