Added search for multiple elements in the view for attach method.