diagnosis ,either AF sensor or oxy sensor defective. How to find which one? on 2003 Lexus ES300

The check engine light stays on and computer stated that either the AF sensor or the oxy sensor in front of the catalytic convertor is defective. Do I have to buy both or is the a way of determining which of the 2 components has to be replaced.

Asked by for the 2003 Lexus ES300
It's the same thing! The upstream sensors..(02 sensors).. are sometimes called Air/Fuel sensors because that is what they monitor before the exhaust enters the catalytic converter...... the downstream sensors are called 02 sensors because they monitor the oxygen content of the exhaust as it leaves the catalytic converter...they are the same but have different task! The front sensors have a different part number than the rear... and are not interchangeable! ... Order either FRONT...... OR...... REAR 02 sensors and you will get the right part! .. In your case it is the FRONT....hope this helps .
Thank you very much, It sure helps.
U R Welcom.