Relative Content

Tag Archive for playwrightplaywright-test

Using playwright test generator recording the element

Using playwright test generator recording the element .But it always pick in build locator like getByRole, getByText.somehow we have to use locator .
Is there any way we can skip this and pick only page.locator instead of page.getByRole

New Spec Files are not appearing in Playwright UI Mode

So I just created a new project using Playwright version 1.17.132 and I am having the following issue:
I just added a new spec file exercise1.spec.ts; for some reason, it is not appearing in UI Mode and is also not running when I use npx playwright test. I also noticed that if I added new code to the example.spec.ts file, which is the default file, that file disappears from UI mode, but when the default code is added back, the spec appears again. My path is correctly set up in the configuration file: testDir: './tests',. I am not sure what else to look at. Can someone tell me what could be occurring or what else I should look at?

Playwright (1.43.1) trace Viewer fails to render UI

I have encountered a weird issue while testing a specific page on a website. All the tests work as expected, capturing a screenshot to a file works fine, but at some point, after the page gets rendered, the UI on Trace Viewer gets distorted. Reproduces both for Chrome, Firefox and Safari browsers. This is how the page looks like on Trace Viewer, a weird mix of the current page the test navigated to, and the previous page. Has anyone encountered this issue?
enter image description here