playwright-test Questions
3
Solved
I have multiple test files in a specific folder with extension spec.ts. How I can run a particular file with Playwright?
Currently for configuration is set as the test folder and will run all files...
Cranford asked 23/12, 2021 at 10:25
16
I have just installed playwright (v1.18.1) to try it out (Windows 11) and I feel like something is wrong. I can run the example.spec.ts script fine, but if I copy that file and then try to run the ...
Scheider asked 9/2, 2022 at 16:47
22
I've installed the Playwright vscode extension but when I go to the testing area I get a "No tests have been found in this workspace" message. But when I run $> playwright test on the ...
Twin asked 3/5, 2022 at 13:25
1
I faced an unclear behavior in the Playwright 1.18 toBeVisible() expectation.
Here is the test row:
await expect(this.page.locator('.top-row .close i')).toBeVisible({timeout: 2000 })
And if the el...
Converge asked 8/2, 2022 at 10:7
2
The test is failing because the loader doesn't allow saving the form but my methods isn't working.
I too have tried to use a function and Promise.all with waitForElementState('hidden'), but doesn't...
Hawker asked 5/7, 2023 at 15:51
6
like in selenium, do we have option in Playwright to wait for an element to be clickable ?
Allative asked 22/7, 2022 at 11:32
3
We have in protractor like:
browser.driver.manage().window().setSize(
width - 30,
height
);
How to achieve this in playwright?
Brigid asked 12/11, 2021 at 11:15
5
I am launching my text execution with the new playwright test runner. Unfortunately I can't get it to start in a full screen mode.
I am using the following code:
const { test, expect } = require('@...
Deflection asked 9/3, 2022 at 9:42
1
Using toBeVisible:
const locator = page.locator('.my-element');
await expect(locator).toBeVisible();
Using toBeInViewport:
const locator = page.locator('.my-element');
await expect(locator).toBeIn...
Tessatessellate asked 15/4, 2023 at 17:58
4
I am currently trying to use expect to do assertions by using const { expect } = require('@playwright/test'); but every time I get Error: Cannot find module '@playwright/test'. It is a very short s...
Madancy asked 2/12, 2021 at 21:38
2
I need to create playwright API request with x-www-form-urlencoded body:
Example from postman:
working postman request example
I was trying to it that way:
async getNewApiAccesToken({request})...
Rawdan asked 6/10, 2022 at 10:2
2
Solved
// foo.ts
import { test as base } from "@playwright/test";
const test = base.extend<{foo: string}>({
foo: "hello"
});
export { test };
// bar.ts
import { test as base ...
Kalila asked 9/1, 2022 at 12:40
2
Solved
I have been trying to learn playwright and during the course of implementation I am trying to write a test case which find an input element by Name and fills it with some values
Unfortunately, the ...
Grallatorial asked 3/8, 2021 at 19:26
2
Solved
I have an input for a login form that is required:
<input
autoComplete="email"
defaultValue={email}
disabled={state === 'submitting'}
id="email"
name="email"
...
Rattoon asked 11/11, 2022 at 20:52
1
Solved
I'm having trouble loading the homepage of my application even though I think I have things configured correctly.
The test and playwright config are the follwing:
example.spec.ts
import { test, exp...
Clarsach asked 10/9, 2023 at 1:18
3
Solved
Playwright: Failed to Read the localStorage property from Window: Access is denied for this document
I have this script to modify localStorage of my browser instance (assuming all definitions are correct). it returns this Error. I have a feeling that this is because Playwright is launching a brows...
Inconsequential asked 17/11, 2021 at 11:43
4
Solved
I am very new to Playwright. Due to my test suites, I need to login into my application before running each test. Inside a single spec file that is easy, I can simply call test.beforeEach. My issue...
Polypary asked 7/12, 2021 at 14:48
4
I've got Playwright test written using TypeScript and I would like to use variables from .env in my test file, how can I do that?
Ivan asked 26/1, 2022 at 9:36
2
I want to log one of the variables inside the playwright test case but am unable to load the log in developer tools console as I am using a page.on() function
test('largest contentful paint', async...
Riess asked 10/1, 2023 at 4:9
3
How to give fixed (Implicit Wait) wait in playwright without any condition.
I need to set a fixed wait value as cypress has as below:
Cy.wait(600);
Thank You
Carlettacarley asked 26/12, 2022 at 13:44
2
Solved
Im looking to use Playwright to test against a web page.
The system im working on has 4 different environments that we need to deploy against,
for example the test urls may be
www.test1.com
www.tes...
Grossularite asked 15/9, 2021 at 14:0
1
I have an E2E tests suite with Playwright that runs on different browsers and viewports.
I specified the different browsers and viewports in my playwright.config.ts:
projects: [
{
name: 'chromium...
Unctuous asked 1/11, 2022 at 14:47
4
Need to find a way to zoom browser in and out during an e2e test run. Below code does not work.
await page.keyboard.down('Control');
for (let i = 0; i < 7; i++) {
await page.keyboard.press('+'...
Affinity asked 15/11, 2021 at 11:9
1
Solved
Friends, does anyone have the code that allows me to include the screenshots in the line I want and make this print be attached to the standard playwright report?
I'm using playwright with javascri...
Parhelion asked 16/9, 2022 at 13:48
2
Solved
I'm using playwright to test a PWA (Progressive Web App) and I want to test the offline behavior.
browserContext has a setOffline method.
When calling playwright as a library, I can set browserCont...
Bouie asked 7/4, 2022 at 0:42
1 Next >
© 2022 - 2025 — McMap. All rights reserved.