A tradie has been convicted for assaulting and spitting on a safety inspector who randomly came across an unsafe construction site in Melbourne's south east.

Atholl Robertson, 51, also tried to hit the WorkSafe inspector's notebook from his hands and take the man's identification at the Elwood site in October last year.

The inspector happened upon the site by accident. Credit:Graham Tidy

The inspector had been driving past when he noticed tradies working close to an unprotected edge more than two metres above the ground.

He pulled over, directed the workers to return to the ground and asked for their identification before being confronted by Robertson.