Semantic queries such as role, label, and text are usually preferred. test IDs are useful when there is no good user-facing query.