This is call a hysterosalpingogram (HSG) and is an X-ray test that looks at the inside of the uterus and fallopian tubes and the area around them. It often is done for women who are having a hard time becoming pregnant (infertile). During a hysterosalpingogram, a dye is put through a thin tube that is put through the vagina and into the uterus. Because the uterus and the fallopian tubes are hooked together, the dye will flow into the fallopian tubes. This is an excellent test, and sometimes the test alone is enough to (sorry to say) clean the pipes, and boost fertility sucess. For an in depth look at this type of test, check out the following link.
http://www.ivf.com/hsg.html

