it could be more a relay problem, do you have the code as the code helps better different code reads come up with a generic code and code read will say what the code is but this can differ from what the code actually means, like
Code 41
to test the sensor, do this. you will need a meter,
Turn ignition off. Disconnect 4-wire connector from O2 sensor. Measure resistance between connector terminals "A" and "B" on O2 sensor. See Fig. 9 . If resistance is 15-20 ohms, go to next step. If resistance is not 15-20 ohms, replace O2 sensor.
then this Check for continuity from each terminal of O2 sensor to ground. If continuity exists, replace O2 sensor. If continuity did not exist, check for continuity between O2 sensor terminal "A" and terminals "C" and "D" individually. See Fig. 9 . If continuity does not exist, go to next step. If continuity did exist, replace O2 sensor.
there is a heater built into the sensor this heats the sensor to work more efficiently. if the heater is damaged this will not work properly, when the exhaust is up to temp it turns it off but still reads the heater. sensor reading is constant. if this fails the ecu log this as a fault and in USA it cuts the engine out. as there is a fault with reading the sensor. a weak or warong relay will also give a false problem but this is because the connections are not good, sometimes you can repair the relay if its not connecting properly, as the copper heats up and its arcing in the switch it will stop connecting until it has cooled down. you can clean the connections on thew switch inside the relay and adjust the copper arm so its a better connection when the relay is in use. O2 sensor this is not the case it could be damaged and need replacing, also if the weather has been wet and humid there could be a leak in the connector to the main wiring this can be a bad seal on the plug, check this for water and also check the connections inside as if they white this means water has gotten in there clean them with emery cloth to clean them back up to a shine and make a good connection. the relay has 2 plastic tabs that you use to open the relay up, they are in the bottom of the plastic use a flat blade or driver to prise it open. hope this helps.