Get a big bottle of Simple Green (or the new Simple Green Automotive) and spray liberally all over (underside of hood, and all over the inside of the bay). This should be done when the engine is slightly warm........not hot, but not cold either. Wait for it to "work" then spray it off with a hose. Pay attention to where you are spraying, you don't want to shot the hose full power at the fuses, connections, etc. If you get some light water/mist on it, I don't worry about it, but don't shoot the spray directly at it. After it is all rinsed off, see what you are working with. If it is still dirty, you may need to follow this process again, or you may have to go at some of the really dirtly parts by hand (again with simple green).........once you are satisfied and the engine is rinsed off, turn the car on and let it run for a while to get rid of all the water. Then, you may choose to put something on the black rubber/plastic to clean it and make it look new again, but that is up to you.
I know there are other ways to do it, many of which may produce a minimally better result, but if you just want to clean it up to sell (no auto shows), this should serve your purpose just fine, and it will be a lot cheaper than a steam clean.
I have been doing it this way for years, and have had zero issues.