This plot point has been bothering me for ages: how do robots distinguish between metals? Many robots in fiction just pick up parts of machinery for self-repair or to make more robots. They don't seem to check what metals they are using or perhaps it has something to do with their senses. Do they somehow scan the materials they get their limbs on? Writers usually gloss over this part to save time, but I like to overthink these details. I'd like to explain this phenomena in more scientific detail. This would flesh out more how autonomous robots operate in my story and others as well.
The assumption in this question is that the robot doesn't have access to specialised equipment to make identification tests on materials. Either the robot comes pre-equipped with sensors that identify metals or it uses its pre-existing senses to figure out what they are made out of. If it's specialised equipment, what is the robot equipped with? If it's pre-existing senses, how does it make use of them?
A robots senses would include: sight, hearing, touch (for advanced models), radio and electromagnetic senses.
How does a robot test materials to know what they are? What's the process like?