This commit is contained in:
Sabina Talipova 2024-04-13 05:31:39 +12:00 committed by GitHub
commit 1d79370230
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -511,6 +511,9 @@ JS;
$parentElement = $page->find('css', $selector);
Assert::assertNotNull($parentElement, sprintf('"%s" element not found', $selector));
$element = $parentElement->find('xpath', sprintf('//*[count(*)=0 and contains(.,"%s")]', $text));
if (is_null($element)) {
$element = $parentElement->find('xpath', sprintf('//*[text()[contains(.,"%s")]]', $text));
}
Assert::assertNotNull($element, sprintf('"%s" not found', $text));
$clickTypeFn = $clickTypeMap[$clickType];
$element->$clickTypeFn();