Vehicle charging systems haven't changed much over the last few decades. But with the increasing complexity of the modern automobile, along with the addition of many aftermarket accessories such as cell phones, DVD players, high-power audio systems, alarms etc., the role of the charging system is now more important than ever. The charging system on your vehicle can be thought of as a small power plant which does exactly what its name implies - charges and maintains a good state of charge on the battery.
Testing a battery's performance and reserve (or amp-hour) capacity is not just a matter of seeing whether it will hold a charge (or checking the electric eye found on some batteries to see if it is green), so testing is best done by an auto technician at a repair shop. A professional can also determine if any problems you are having may be caused by something else, like your battery terminals or alternator. If a bad battery is the culprit, your mechanic will help you choose and install an appropriate replacement.
If the battery warning light (a light in the shape of a battery symbol) on the dashboard comes on while you're driving, that means the charging system isn't working, but the fault may lie in something other than the battery. The cause of the battery light could be a loose or corroded battery cable or other wire connecting components of the charging system, or it might be a problem with the alternator or voltage regulator. The alternator generates the power that is stored in the battery. If the alternator fails, or the accessory belt that drives the alternator is loose or broken, then you'll end up with a dead battery because the bad alternator isn't recharging the battery.
Unplug the wiring harness from the window motor. You will have to press down on the clip that holds the wiring harness into place and pull the harness out. These can be hard to press and sometimes it is best if you can get a screwdriver on it to press it in. Unbolt the harness andor motor from the door's interior. Any bolts holding the harness and motor will have to be removed.