major
#29373
Buttons Do Not Respond to Programmatic DOM Clicks (UI Test Automation with Playwright)
When controlling the TopLogic UI with Playwright (test automation, MCP Browser), key buttons do not respond to programmatically triggered clicks. Only “real” position-based mouse events (page.mouse.click(x, y)) work reliably. This significantly complicates automated UI testing and also points to accessibility issues.
Observed in the demo application (DEV-SNAPSHOT, Chrome/Chromium):
1. Login dialog: The “Log In” button ignores clicks
A Playwright click on the “Log In” button (both getByRole('link', { name: 'Log In' }).click() and text locator clicks) does not trigger the login—nothing happens; no request reaches the server. The button is rendered as a link (<a href="#"> with <h4>Log In</h4>).
Workaround: Fill in the fields and press Enter in the password field.
2. Toolbar buttons: Clicking only focuses the button, but does not activate it
Toolbar buttons (e.g., a form’s edit pencil, the save checkmark, Undo/Redo in the table toolbar) do not respond to locator.click():
- The button’s accessibility tree ref resolves to a proxy element #c<nnn>-input; clicking it only sets the focus ([active]), but does not execute the command.
- Pressing Enter on the focused button also does not activate it (keyboard navigation is similarly affected).
- Only a real coordinate-based click event (page.mouse.click(x, y) at the position read from a screenshot) triggers the command.
Expected Behavior
- Buttons should respond to standard DOM click events (regardless of whether they are triggered by actual hardware or programmatically/via assistive technology).
- Buttons should be activatable via the keyboard (Enter/Space on the focused element) and have the correct ARIA role (button).
Probable cause: The client controls bind their handlers to ` mousedown`/`mouseup` or specific event sequences instead of the `click` event, and/or the focusable proxy`<input> ` is not the element that carries the handler.