#104702Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically
Description
This test fails sporadically:
1) FileClipboardCest: See add remove multiple records Test Acceptance/Application/FileList/FileClipboardCest.php:seeAddRemoveMultipleRecords [Facebook\WebDriver\Exception\ElementClickInterceptedException] element click intercepted: Element <button type="button" class="dropdown-item disabled" data-multi-record-selection-check-action="check-all" title="Check all">...</button> is not clickable at point (121, 269). Other element would receive the click: <li>...</li> (Session info: chrome-headless-shell=124.0.6367.118)
See Slack discussion:
https://typo3.slack.com/archives/C03AM9R17/p1724316947431929
The button is disabled via CSS class="disabled":
.dropdown-item.disabled, .dropdown-item:disabled {
pointer-events: none;
}
$I->waitForElementClickable() does not work with CSS pointer-events: none
$I->waitForElementClickable() boils down to:
/**
* Is the element currently enabled or not? This will generally return true
* for everything but disabled input elements.
*
* @return bool
*/
- https://github.com/php-webdriver/php-webdriver/blob/11923b4ba312fc9d137266ae67438be65d4d500f/lib/WebDriverExpectedCondition.php#L406-L434
- https://github.com/php-webdriver/php-webdriver/blob/11923b4ba312fc9d137266ae67438be65d4d500f/lib/Remote/RemoteWebElement.php#L353-L365
Clean solution:
Make disabled buttons really disabled, then waitForElementClickable might work.
- Current state:
<button class="disabled">…</button> - Should be (also for a11y):
<button class="disabled" disabled>…</button>
Quick solution:
Change the test.
- Current:
$I->waitForElementClickable('button[data-…="…"]'); - Should be:
$I->waitForElementVisible('button[data-…="…"]:not(.disabled)');
Reviews 6
- 11.5 86097[TASK] Stabilize FileClipboardCest by checking for content-iframe reload
- 12.4 86096[TASK] Stabilize FileClipboardCest by checking for content-iframe reload
- main 85744[TASK] Stabilize FileClipboardCest by checking for content-iframe reload
- 11.5 85737[TASK] Stabilize FileClipboardCest button-click
- 12.4 85736[TASK] Stabilize FileClipboardCest button-click
- main 85732[TASK] Stabilize FileClipboardCest button-click
Related issues 4
- Task #104585Stabilize FileClipboardCest ac test
- Task #104703A11y: Really disable buttons with 'class="disabled"' for data-multi-record-selection…-action
- Task #104714Test 'FileClipboardCest.php:seeAddRemoveMultipleRecords' fails sporadically again
- Task #104964Column-selector-button and clipboard-panel reload the whole TYPO3-backend instead of just updating the content-frame