There is no "safe" paternity test that can happen previous to a baby being born. They however can do it right in the delivery room if necessary. Also, if you have to undergo an amniocentesis for defects or testing of the baby for maturity, they can use the fluid for DNA testing as well (doctors won't do an amniocentesis just for a paternity test). However there is risks for amniocentesis, and the safest and most appropriate time to do a test is after the birth.
Information on this site is provided for informational purposes only.
It is not meant to substitute for medical advice provided by your physician or other medical professional.
If you have or suspect that you have a medical problem, promptly contact your physician or health care provider.