Checking engine oil level in cars is always done with the engine off, and at least a few minutes after it has been running.
Checking automatic trans fluid level can be more complicated. See your owners manual. IIRC it can involve a warmup drive, then stopping, then running the shift lever into each position for a while, then turning off the engine, or not, and waiting, or not. See the manual for your car.