Pregnancy

How do ovulation tests work? Been trying to get pregnant for a few months and not having any luck. Could someone explain what to get and what to do??? It’s greatly appreciated!