battery discharges as I drive the car. I have replaced the battery and the alternator
Hello, It sounds like you may have faulty voltage regulator that may not be allowing the alternator to charge the battery properly. The voltage regulator is a unit that regulates the charging of the battery by the alternator and maintaining a certain amperage while the engine runs. Unfortunately, even with a properly functioning alternator, the voltage regulator may cause your car not to charge properly. I would suggest having a professional from YourMechanic come to your location to inspect your charging system.