Use nearest parent with id as root when locating elements
We don't rely on id's for locating elements because we cannot count on the id being set for an element of interest, nor can we rely on it for certain being stable across page visits. However, for some sites it will be stable. And even if the target element does not have an id, if we scope our search to the nearest parent that does have an id, we may increase our odds of finding the correct element.
Edited by 🤖 GitLab Bot 🤖