playwright
playwright copied to clipboard
[BUG] Possible Regression with locator.click()
System info
- Playwright Version: [v1.41.1]
- Operating System: [ Windows 11, ]
- Browser: [Chromium ]
- Other info:
Source code
await itemMaterialCostCell.scrollIntoViewIfNeeded(); //it was added for sure, but the locator was always visible
await itemMaterialCostCell.click(); // this one is executed but in real it doesn't clicked
//await page.getByRole('cell', { name: '$' }).locator('div').first().click();
console.log('jmeno polozky: ' + itemMaterialCostCell);
await page.locator('role=textbox').fill('10');
await page.keyboard.press('Enter');
[Please provide a self-contained example in a form of a snippet, archive or a repository.]
[Repro scenario can't be large or have external dependencies.]
Steps
- Have locator to non-standard element for clicking.
- Try to click to that locator by locator.click()
Investigation/Info
- I am pretty sure it was working in some previous version of Playwright.
- I am implementing some function to parse pretty big table with clicking inside the table and filling the data to the table.
- I am almost 100% sure that clicks worked couple months ago, unfortunately I don't remember in which version of Playwright, it was definitely around beginning of the year. I was able to revert to 1.40.1 but looks same. Maybe there is problem with Chromium I don't really know.
- If I debug it once it clicked and once not.
- Can be problem with that tooltip? We did some refactoring for these columns, but as I said sometimes it clicks properly.
- We have some old tests in protractor and the Selenium Click works properly in similar locators.
- I saw around couple of "bugs" with similar problem, but in my case Playwright thinks that he clicked, because if I click manually during the test the fill works and sometimes it clicked properly.
Expected
Playwright should click. It looks like the cursor is up to the locator but it doesn't click at all.
Actual
I was able to click to the locator, but only when another step occurs after click.
I was able to click in debug mode once from two columns.
If necessary I am able to zoom/team to investigate the issue. I am UTC+1