[tests] simulate getElementsByTagName() if absent