I've always popped the hood on my vehicles at the car wash and blasted away. I watch out for the alternator (still hit it but not constant) or cover the cold air intake, but other than that I don't worry about it and have never had a problem. Heck, that's how I used to know I needed a dist. cap or plug wires in my older cars!! Most are scared to do it, but it's not much different than driving down the expressway in the rain. Newer vehicles electronics are pretty insulated these days. Thats how they do it at the dealers and detail shops most of the time.
I'll probably get some naysayers to my response, but I honestly do it nearly every wash on all of the 30 some odd vehicles I've owned and never once had a single issue doing so. When I was a youngster, there were times where I would completely submerge a truck off roading and as long as it got air to breathe, it would stay running. That's with the fan blasting water all over the place.