MNT Behat test for gridfield object on page

This commit is contained in:
Sabina Talipova 2024-01-08 08:30:01 +13:00
parent d946d69f17
commit 15e24f92d0
1 changed files with 3 additions and 0 deletions

View File

@ -510,6 +510,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();