how to know if an IR sensor is TX or Rx?
they are the same color(white). is there any way how to test it?
or anything of the two can be use Tx and Rx? tnx..
Digital cameras can see infrared, so get a 3V battery, a 470 ohm resistor and try them both (also swapping pins) while looking at it on the screen of a camera. With low voltage and resistor I think it's safe for both components.
A badly lit room helps.
Those are almost certainly IR LEDs and I agree that you should test them as recommended. I think I'd try a voltage a bit over 3V though, to be sure you overcome Vf. 3 AA cells should be fine, using the resistor of course. Cellphone cameras will usually show you a lit LED.