Welcome to 2CarPros. As the fan still works when connected to the battery we can rule it out. Next to check would be the fan fuse, it should be a 30 amp in the same box as the fan control relay, in the junction box under the hood. It is controlled by a signal from the PCM.
Using a simple test light connected to ground, with the key in run, remove the relay and you should find battery power at terminals 1 and 3. Now connect the test light to battery power and check for a ground at terminals 5 and 7. 5 is the fan feed and should show as a ground if the fan is connected the way it was originally. Terminal 7 is a direct ground. If these all check good then the next thing would be the signal lead from the PCM, which you would need a scan tool to activate. Another item to check would be the coolant temperature sensor. In many vehicles an easy test would be to just unplug the sensor. The PCM should then turn on the cooling fan (if the engine is running) as it doesn't know the coolant temperature and turns the fan on as a precaution. If unplugging it turns the fan on with it connected as it was from the factory you can skip the rest of the tests and just replace the coolant temperature sensor.
SPONSORED LINKS
Thursday, August 8th, 2019 AT 2:02 PM