I don't know how about in the UK, but here in Poland (and I know, we have quite a few different kinds of papers) to merely take the exam you need to show some kind of ID. It sounds reasonable to me, just to make sure it's you passing the exam and not your professionally-driving friend.
Now, given that the wizarding community is hiding, I don't see how any of them could have any kind of 'official' identification and take part in any muggle affairs that require it, including taking a driving exam. Was this somehow dealt with in canon? Or any plausible explanation? The fact that it took him 19 years did allow for some preparations.
Edit: There are two reasons why I don't believe that he could've Confunded the examiner.
First, the exact quote about the exam:
“Parked all right, then?” Ron asked Harry. “I did. Hermione didn’t believe I could pass a Muggle driving test, did you? She thought I’d have to Confund the examiner.”
“No, I didn’t,” said Hermione, “I had complete faith in you.”
“As a matter of fact, I did Confund him,” Ron whispered to Harry, as together they lifted Albus’s trunk and owl onto the train. “I only forgot to look in the wing mirror, and let’s face it, I can use a Supersensory Charm for that.”
This clearly states the examiner was Confunded in the middle of the exam. The presentation of ID is likely the first thing to do, so it would be too late.
Second, the Confundus charm has some lasting effect on the victim - take for example Dawlish or how Cormac McLaggen behaved after he was Confunded by Hermione during the Quidditch tryouts. The examiner in that case would be in no condition to really assess one's driving skills (or in an emergency stop the car). And I find it hard to believe that altering the exam results in this way is something Hermione would allow as a primary plan.