Issue 1:
This issue is observed in Chromium .......as the browser window is limited and infinite scroll comes into action as we need to navigate down to the next screen to find the element.

Onclick action is performed once the element is found.

But the unstable condition is thrown in between these 2 events. Auto scrolling is by default enabled.

This works fine in firefox browser. Below i will highlight the debugger code against firefox(works fine) vs chrome(does not work)

System info

Playwright Version: Version 1.35.1

Operating System: [macOS 13.2, etc.]

Browser: [All, Chromium]

Other info:

Source code

import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {

await page.goto('https://qe.east.cbna.dev1.dev.aws.swacorp.com/');

await page.goto('https://sso.fed.dev.aws.swacorp.com/as/authorization.oauth2?redirect_uri=https%3A%2F%2Fqe.east.cbna.dev1.dev.aws.swacorp.com%2Fcallback&client_id=p501608&response_type=code&state=mxaSNWViPd&scope=openid%20email%20profile%20address%20phone&code_challenge=MLS4NB8jPuB2T-eF5UpbgiaB4kdfSIxi4GHP_w4fl94&code_challenge_method=S256');

await page.locator('#username').click();

await page.locator('#username').fill('');

await page.locator('#username').click();

await page.locator('#username').fill('e14242');

await page.locator('#password').click();

await page.locator('#password').fill('pauoRD9H');

await page.getByText('Submit').click();

await page.goto('https://qe.east.cbna.dev1.dev.aws.swacorp.com/');

await page.goto('https://qe.east.cbna.dev1.dev.aws.swacorp.com/dashboard');

await page.getByTestId('card-button-IFVacationAuction').click();

await page.getByTestId('tab-label-1').click();

await page.getByTestId('cl-nav-link--1').click();

await page.getByTestId('search-employeeId').click();

await page.getByTestId('search-employeeId').fill('5050');

await page.getByTestId('search-employeeId').press('Tab');

await page.getByTestId('button-anchor').click();

await page.getByRole('menuitem', { name: 'Update Accrual' }).click();

await page.getByTestId('adjustedAccruedDays').click();

await page.getByTestId('adjustedAccruedDays').fill('30');

await page.getByTestId('textarea--adjustmentComment').click();

await page.getByTestId('modal-save').click();

await page.getByTestId('cl-nav-link--3').click();

await page.getByTestId('actions-3').getByTestId('button-anchor').click();

await page.getByRole('menuitem', { name: 'Re-award Base' }).click();

});

When the code is run via playwright the application becomes unstable....here is the piece of code.. in the automation script for the above 2 lines highlighted in bold produced by playwright debugger.

against Chrome - auto scrolling comes into picture and that intercept the click event.....

LOG

waiting for getByTestId('actions-7').getByTestId('button-anchor')

locator resolved to <button type="button" id="button-anchor" class="css-16nx…>…

attempting click action

waiting for element to be visible, enabled and stable

forcing action

element is visible, enabled and stable

scrolling into view if needed

done scrolling

performing click action

click action done

waiting for scheduled navigations to finish

navigations have finished

In this case the reaward-base sub menu is not available or visible. Although the same sub menu appears in the safari browser perfectly fine.

Above code in safari browser....works fine and this is in the logs

locator.click

TIME

wall time:

7/18/2023, 8:28:08 AM

duration:

16ms

PARAMETERS

locator:

getByTestId('actions-7').getByTestId('button-anchor')

strict:

true

force:

true

LOG

waiting for getByTestId('actions-7').getByTestId('button-anchor')

locator resolved to <button type="button" id="button-anchor" class="css-16nx…>…

attempting click action

waiting for element to be visible, enabled and stable

forcing action

element is visible, enabled and stable

scrolling into view if needed

done scrolling

performing click action

click action done

waiting for scheduled navigations to finish

navigations have finished..

In this case the reaward-base sub menu is available - refer the screen shot below

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]

or

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
await page.getByRole('checkbox').check();
await expect(page.getByRole('checkbox')).toBeChecked();
});

Steps

[Run the test]

[...]

Expected

[Describe expected behavior]

Actual

[Describe actual behavior]

Issue 2:
Issue Description: I am writing some tests for a kanban board app built with react. i have a test that verifies the following behavior doesn't occur:

test_against.this.behavior.mov

This involves dragging a task to a spot, then dragging it away from that spot, and then dropping it.

The issue i'm facing with playwright is that I am able to drag the task to the first spot, but i am unable to move away from it. However, If I remove the first mouse down event, i move as many times as i want. This leads me to believe that once I have triggered a mouse down event, I am only able to move once. Any further moves are not possible.

Video of moves without mousedown

without_mousedown.webm

Video of moves with mousedown

with_mousedown.webm

System info

Playwright Version: 1.31.1

Operating System: macOS 13.3.1

Browser: All

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

https://github.com/sbmsr/playwright-mousedown-issue

Steps

run npm install

run npm dev:client to start local vite server

run npm dev:sever to start backend

run npm test to run the tests

comment the mouse.down on line 84, and view the video to see that the mouse moves fine without it

Expected

I expect the mouse to drag the task to two places on the screen.

Actual

The mouse drags the task to the first intended place, but not the second.