mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
73ffaf65d7
This PR is a fix proposal for a bug when trying to record a omnibox navigation after a recorded action (e.g., `fill`). The following test, included in this PR, reproduces the problem: ```ts test('should record omnibox navigations after recordAction', async ({ page, openRecorder, server }) => { const recorder = await openRecorder(); await recorder.setContentAndWait(`<textarea></textarea>`); await Promise.all([ recorder.waitForOutput('JavaScript', 'fill'), page.locator('textarea').fill('Hello world'), ]); // for performed actions, 5 seconds is the time needed to ensure they are committed await page.waitForTimeout(5000); await page.goto(server.PREFIX + `/empty.html`); await recorder.waitForOutput('JavaScript', `await page.goto('${server.PREFIX}/empty.html');`); }); ``` After performed actions (e.g., `click`), it successfully records the navigation as long as there's at least a 5 sec. gap between both actions. That happens because after that 5 sec. interval the performed action is automatically commited and therefore the navigation is not stored as a signal of that action. The proposed fix for recorded actions also forces that action to be automatically commited after 5 sec (for testing, I'm using 500ms to speed up the test execution). |
||
---|---|---|
.. | ||
bin | ||
bundles | ||
src | ||
types | ||
.eslintrc.js | ||
.npmignore | ||
browsers.json | ||
cli.js | ||
index.d.ts | ||
index.js | ||
index.mjs | ||
package.json | ||
README.md | ||
ThirdPartyNotices.txt |
playwright-core
This package contains the no-browser flavor of Playwright.