The methods `getObjectsWithTag` and `getObjectsWithAttr` actually return ids and not objects.
The methods
getObjectsWithTagandgetObjectsWithAttractually return ids and not objects.