scrollIntoViewHoverClick($triggerSelector, self::CSS_SELECTOR); } /** * Click the confirmation button on a CMS dialog */ public function cmsConfirmDialogActionYes(): void { $selector = 'buttonYes'; // Wait for the button to be ready $this->waitForElementDisplay($selector, self::ID); $this->waitForElementEnabled($selector, self::ID); // Move to the element to simulate human focus before clicking $element = $this->byId($selector); $this->webDriver->action()->moveToElement($element)->perform(); $element->click(); $this->waitUntilDomReadyState(); } public function cmsConfirmDialogActionCancel(): void { $selector = '#confirmDialog > div > div.header.ui-draggable-handle > a'; $this->waitForElementDisplay($selector, self::CSS_SELECTOR); $this->byCssSelector($selector)->click(); $this->waitUntilDomReadyState(); } }