Question: clomid vs femara

Hey guys, question... does anyone know why doctors choose to put you on one versus the other? Is there certain tests that say try one drug over the next? Or is it trial and error? Just curious!