MOBILE-4616 behat: Fix go to parent element in closest matching

main
Pau Ferrer Ocaña 2024-09-02 16:14:11 +02:00
parent e2e1792739
commit 80a26121fd
1 changed files with 3 additions and 2 deletions

View File

@ -375,11 +375,12 @@ export class TestingBehatDomUtilsService {
return element;
}
if (element === container || !element.parentElement) {
const parent = this.getParentElement(element);
if (element === container || !parent) {
return null;
}
return this.getClosestMatching(element.parentElement, selector, container);
return this.getClosestMatching(parent, selector, container);
}
/**