thinking that sth is sth else
in mistake for sth
Children may eat pills in mistake for sweets.
Definiciones del Oxford Advanced Learner's Dictionary, 9.ª edición