While driving my car engine stops. on 2006 Hyundai Elantra

I have changed sensors, cables, among others. Now the car tries to shut down after driving a while. Some have mentioned computer others the gasoline pump. When putting the car in machine to check sensors many just pop up. Sensors that have been changed.

Asked by for the 2006 Hyundai Elantra
rec. fuel system clean. ethanol treatment to 1 tank of premium. ethanol treatment causes build up in fuel system, combustion chambers, exhaust system and causes increased wear to spark plugs. build up can trip the sensors.
1 more answer
Did you try the crankshaft position sensor?
It sure does sound like it.