From eccb578f019fd665617471f64c27c18c3eeb8c9a Mon Sep 17 00:00:00 2001 From: barbaragr Date: Mon, 21 Sep 2026 15:20:31 +0200 Subject: [PATCH] IBX-12632: [Behat] Waited for the dropdown items in IbexaDropdown::selectOption() selectOption() called findAll() immediately after the dropdown was opened. BaseElement::findAll() only waits for raw CSS matches and applies the VisibleCSSLocator visibility criterion afterwards, so while the popover is in the DOM but not yet visible the collection comes back empty - no timeout, just "Collection is empty". Wait with ElementExistsCondition first, the way the sibling selectOptionByValueFragment() already does. Co-Authored-By: Claude Opus 5 (1M context) --- src/lib/Behat/Component/IbexaDropdown.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Behat/Component/IbexaDropdown.php b/src/lib/Behat/Component/IbexaDropdown.php index 216a3f0d4c..51cb21eb85 100644 --- a/src/lib/Behat/Component/IbexaDropdown.php +++ b/src/lib/Behat/Component/IbexaDropdown.php @@ -36,7 +36,8 @@ protected function specifyLocators(): array public function selectOption(string $value) { $dropdownOptionLocator = $this->getLocator('ibexaDropdownExtended'); - $listElement = $this->getHTMLPage() + $listElement = $this->getHTMLPage()->setTimeout(5) + ->waitUntilCondition(new ElementExistsCondition($this->getHTMLPage(), $dropdownOptionLocator)) ->findAll($dropdownOptionLocator) ->getByCriterion(new ElementTextCriterion($value)); usleep(2000000);