ober WROTE:I think you mis-understand what proposed by robosang. He actually want you to test the sensor alone, not only looking at the LED on sensor, but the voltage at the output wire, it should be the black wire from sensor. Measure the voltage at that point. Pull it up to 5V with 10K, use multimeter measure black wire and refer to GND. The voltage should drop to 0V when sensor detect and changes stage, else in normal condition, the voltage should be high (5V or 4.9+V). No microcontroller or switches or LED involve in the test. Only, sensor, 5V supply, pull-up resistor and multimeter.
Yup, that is exactly what I meant, thanks ober for explaining it.