Ways To Test iMac G3 Before Buying
I am going to buy an old iMac G3 Over the next couple of days/weeks,
and I want to make sure that I am buying a system with no problems.

Assuming you're getting the Bondi-Blue iMac G3, you're looking at a machine with 20 years on it.  Getting one with &quot;no problems&quot; is a tall order and akin to buying a &quot;reliable classic car.&quot;
Some of the issues you can expect:

brittle plastic
malfunctioning CD-ROM
leaking capacitors
failing IDE/PATA Hard Drive

If you get a machine that boots and runs, you're well on your way.  That said, this will run OS 8, 9 and OS X through 10.3 Panther.
What to look out for...

Make sure you have original install disks.  If you do, the second disk will have your diagnostic tools.  Boot that and run them

Run First Aid using Disk Utility.  If the drive is actively failing, this will tell you.

Bring an audio CD  with you to test out the drive and how well the speakers work

Determine whether you're getting the Rev A. or B model.  The B version had the ability to support more memory (512M versus 384M) and better graphics (6MB VRAM on ATI Rage Pro versus 2M RAM on ATI Rage)