Questions tagged [playwright]

Playwright is a library to automate Chromium, WebKit and Firefox with a single API. Playwright is similar to Puppeteer, but with cross-browser support and Python, Java, and .NET bindings, in addition to Node.js.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

I am trying to scrape images from a website with playwright. I am unable to scrape its one div content load dynamically

I totally don't get the page load normally, still, bigImage is empty. Here's the below code. I am using asyncio and playwright along with lxlm and requests. I am trying to wait for the element to load ...
Atul Anand Oraon's user avatar
0 votes
0 answers
22 views

Replaying network requests from HAR like PlayWright in Chrome

Is there a way to replay API requests to a specific URL (possibly via a .har file). PlayWright has a feature like this called routeFromHAR (https://playwright.dev/docs/mock#mocking-with-har-files) ...
dashb's user avatar
  • 119
0 votes
0 answers
27 views

Playwright - Parameterize projects with fixture and pom

I'm trying to figure out what the best way is to parameterize a project with fixture and pom. I'm thinking that it would be nice to have a project use option, similar like setting the browser or ...
Hoppjerka's user avatar
  • 128
0 votes
0 answers
11 views

Playwright w/ Specflow and NUnit: Parallel execution only on some tests

I want to run some tests on parallel and some tests not on parallel. When I use [assembly: Parallelizable(ParallelScope.Fixtures)], all of the tests are running on parallel even if I use [...
Coldzin's user avatar
-1 votes
0 answers
12 views

Playwrite test cases not showing updated element in playwrite debug inspect element

I have added a data-testid on local its visible in inspect element but on playwrite debug inspect its not visible. I am using command to run the test is - yarn pw:debug
Shikha's user avatar
  • 96
2 votes
0 answers
15 views

Specflow Playwright - Cant get to the launch the browser at all. What am i missing?

Here's the driver class [ Binding] public class Driver : IDisposable { private readonly Task<IPage> page; //similar to driver declaration private IBrowser? browser; public Driver() { ...
Abhed Patil's user avatar
0 votes
0 answers
20 views

How to run Playwright in headed mode under dotnet docker container?

I'm trying to run a headed Firefox using Playwright in a docker container. Headless works, but headed not. Here is my Dockerfile: FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base WORKDIR /app EXPOSE ...
Andy Schmitt's user avatar
2 votes
2 answers
71 views

Check array of objects contains value

I'm running into an issue where I have a response that contains an array of objects, the array isn't always in the same order based on the response, but I need to verify that at least 1 of the objects ...
msmith1114's user avatar
  • 2,771
0 votes
1 answer
20 views

How to validate strike out names, Property and Motorcar in TypeScript code using visual studio code editor?

> [In the below HTML, need to validate strike out text Property and Motorcar using TypeScript using visual studio code editor ]
Naresh Babu's user avatar
0 votes
0 answers
16 views

allure-playwright (or general allure) style customisation

In my current project I use allure-playwright to generate the reports. I get allure-playwright from npm like any other normal node package. However, is there any way to customise the styling of the ...
Joseph's user avatar
  • 571
0 votes
0 answers
25 views

How to Test Scroll Behavior When Scrollbar Doesn't Exist with Playwright?

I'm currently working on automated tests with the page object using Playwright, and I have a function scrollDownAndUpOnboarding that's designed to scroll down and then up on a web page. However, I've ...
Andres Mitre's user avatar
1 vote
1 answer
18 views

Playwright component screenshot sometimes fail due to different alignment

I am doing visual screenshot testing at component/element/locator level and not full page. Test passes most of the time, but sometimes, in actual image the text is rendered few pixels below the ...
Saurabh Shrivastava's user avatar
-1 votes
1 answer
32 views

How to assert two different expectations in playwright?

I'm testing for two different Text contents in playwright. Once a user selects a particular option, I have to go back to the main page and check the text content. I already have an if statement for ...
FA66's user avatar
  • 1
0 votes
0 answers
23 views

Playwright (playwright build v1080) freezes while Downloading Chromium 117.0.5938.62 [closed]

please excuse me if my answer is not well organised, it is my first one. I have the issue of my command prompt gets to freeze every time I try to install playwright and especially whenever it tries to ...
Paul TOCEB's user avatar
0 votes
0 answers
22 views

Can't Scroll With Scrapy-Playwright

I'm only getting the initial links. The screenshot is always the same no matter what PageMethod I try. I've tried "keyboard.press", "mouse.wheel", etc. I've also read the docs and ...
RookiePython's user avatar
-2 votes
0 answers
12 views

I want to create docker image of my custom playwright

I want use playwright-extra and puppeteer-extra-plugin-stealth plugin. but I dont want it to use when I create browser instead I want to make change playwright library and use these package by default....
Vinesh Dodiya's user avatar
0 votes
1 answer
28 views

Pause the main thread during the execute callback function

I am trying to use page.on to listening certain event, and once it is triggered I want to use callback function to handle it and pause the main thread operation till the callback finished. How can I ...
Ziqi Xiao's user avatar
1 vote
1 answer
51 views
+50

Getting wait timeout exception for page.navigate("someURLWhichIsAccessableFromPod") method within the docker pod

I have written one test case using playwright, which will open one web page using page.navigate() method and once it is loaded it will do further testing on opened web page. Here the issue i am ...
Jeff's user avatar
  • 131
0 votes
0 answers
40 views

Playwright Cannot read properties of null [closed]

Im running a test on playwright, where basically registers a new element, the problem is when i do this manually it works fine, aparently, but then, when i try by using playwright goes trough every ...
Invitado96's user avatar
0 votes
0 answers
17 views

Mock a function in a streamlit app during e2e testing

I have a e2e testing framework for running my streamlit app but am having trouble mocking some functions that make SOAP requests. Where in my framework should I be adding the mocked function? import ...
KnowNothing's user avatar
1 vote
1 answer
22 views

Seeking Playwright Version to Browser Version Compatibility Table for Automated Binary Deployment

We're using Playwright and due to security restrictions, we have to manually download and deploy the browser binaries in our on-premise infrastructure. We're interested in finding a table or ...
blizzfire's user avatar
1 vote
3 answers
70 views

"Event loop is closed! Is Playwright already stopped?" [duplicate]

Context After initialisation of a playwright browser object in function initialise_playwright_browsercontroller, I try to use its Page object in another function. However, that yields get error: &...
a.t.'s user avatar
  • 2,032
-1 votes
0 answers
22 views

How could we use the login method in beforeAll if I define the login page as fixture in Playwright

This is my fixture.ts type pages={ LoginPage:loginPage; } const testPages = baseTest.extend<pages>({ LoginPage: async ({page}, use) => { await use(new loginPage(page)); } }...
Nadeesha Liyanage's user avatar
0 votes
0 answers
30 views

Integrating Playwright E2E Testing with JWT Token Authentication and API Calls [closed]

I am trying to integrate Playwright end-to-end (E2E) testing into my frontend application. My goal is to perform user login and then test various pages, making API calls that require a JWT token and a ...
Zenhar's user avatar
  • 9
-1 votes
0 answers
42 views

How to pass captcha challenge using Playwright?

Why can't Playwright pass the captcha challenge (https://www.bing.com/turing/captcha/challenge) even when handled by a human? I have tried changing the user-agent, headers, and using proxies, but it ...
Brian's user avatar
  • 9
0 votes
0 answers
12 views

Playwright Python Iframe not able able to locate and fill elements

THE DOM ModelPlaywright using python - I am trying to identify an iframe whose name and id are appended with text that is changing dynamically. I am trying to get the iframe and then locate and fill ...
Nishank Jain's user avatar
-2 votes
0 answers
48 views

Solving Captcha in python [closed]

I am trying to solve Image captcha in python , I have tried to use Capmonster service but it's giving me wrong response, Maybe because the image is a base64-encode string and that's I am using PIL and ...
Mayar Eskafi's user avatar
0 votes
0 answers
16 views

Dynamic import in page.evaluate Playwright

I have following Problem: I want to call specific api endpoints in my playwright tests to improve my e2e tests. Therefore i need to store the api URIS. The api endpoints are loaded via an script that ...
CenterADiv's user avatar
0 votes
0 answers
11 views

Downloading BLOB or access chrome pdf-viewer

I’m trying to download blob, that is generated inside javascript and served to chrome. I’ cant handle it using page.on(‘download’) because there is no such event emited. async function ...
Aleksandr Stanov's user avatar
0 votes
1 answer
45 views

In playwright, how can we assert if an icon is visible in UI?

Problem - In playwright I need to find the way to assert if the icon below is visible in UI or not. <div data-testid="icon-container> <div class="icon"></div> ...
utkarsh-k's user avatar
  • 852
0 votes
0 answers
20 views

Playwright, Node.JS & Cucumber - Artifact is disposed more than once

I need a bit of help identifying this issue. I don't understand what it means and there's seemingly no help online for this error. It comes when trying to run my Cucumber-JS, Node.JS & Playwright ...
Raisus's user avatar
  • 148
0 votes
2 answers
47 views

playwright - how to use locator depends on device in test?

I want to use different locator to mobile and desktop device in PageObject not in test.spec.. how to get browserName ? async login(phoneNumber: string, smsPassword: string): Promise<void> { ...
Beatz Tomek's user avatar
0 votes
1 answer
18 views

Playwrite Recommendation on Language It Supports

We know playwright supports multiple languages node js/java/.net/python, when we are doing analysis in playwright we got to know some of the features are not available in java version and available ...
Wild's user avatar
  • 11
0 votes
0 answers
16 views

Error: net::ERR_ABORTED at about:blank sometimes occurs at the beginning of a Playwright test

I have a sequence of Playwright tests (using test.describe.serial) that test the checkout of an eCommerce application. They use the website to check out products, then check in the backoffice that the ...
Michael S.'s user avatar
0 votes
0 answers
23 views

https://trace.playwright.dev/ stopped working. When we select trace file, it is showig blank page

When we select any trace file in https://trace.playwright.dev/, it is showing blank white page. All my colleagues are facing same issue. Screen Recording: https://cin7.mangoapps.com/msc/...
Abhishek Sanghvi's user avatar
1 vote
1 answer
30 views

Playwright's Or operator may match both elements

I'm trying to use the recent Or operator. C# code but idea applies to any Playwright language: var newLocator = someLocator.Locator(".foo").Or(someLocator.Locator(".bar")); I ...
lonix's user avatar
  • 14.5k
1 vote
1 answer
36 views

Is it possible to get current selected text in Playwright JS select dropdown?

I can set value in the select dropdown. But when I call textContent, it returns all options values. My task is to verify that the set value is selected properly by extracting the value and checking it....
Mukha's user avatar
  • 143
1 vote
0 answers
36 views

Executable path for chromium not found when code is deployed

I am using Playwright and Chromium where when a user hits a rest endpoint, it calls following test function: import { chromium } from 'playwright'; const getPlaywrightExecutablePath = () => { ...
karvai's user avatar
  • 2,445
0 votes
1 answer
32 views

Is there a way to ignore playwright's "No tests found" error and allow the test run to pass?

Our team is using Playwright projects and has multiple projects (e.g. "main" and "new"). In CI, we are adding logic to only run a subset of playwright tests. The subset is ...
Patrick Finnigan's user avatar
1 vote
1 answer
29 views

Playwright - Can't access local files using file:// in an img tag

In node js, I am using playwright to open a browser page, setcontent with some html and then take its screenshot. The html contains an image tag and the src of the img is a local file. In the ...
The Prenx's user avatar
  • 495
1 vote
0 answers
20 views

Location to executable works locally but not found in remote

In my node js app, this is my folder structure. application utils index.js playwright chromium-1076 chrome-mac Chromium.app Contents ...
karvai's user avatar
  • 2,445
0 votes
2 answers
32 views

In playwright asserting a locator for visibility vs asserting for a text in that locator for visibility

Consider below div - <div data-testid="textid">some text</div> What I want to do : I want to assert if the text some text is visible on the screen. Which one is correct way to ...
utkarsh-k's user avatar
  • 852
0 votes
1 answer
30 views

Access to a document in a frame. Frontend Test Automation

In the test case, you need to fill input[id="card"], which is located inside the iframe. You must use Playwright. In Playwright documentation there is a frame() method that returns an iframe ...
Aleksei Skvortsov's user avatar
1 vote
1 answer
35 views

How to use locator in evaluate's javascript in Playwright python

I have the following script running: def test_combobox_selected_by_label(page): page.goto("http://www.tizag.com/htmlT/htmlselect.php") element = page.get_by_role("combobox"...
M András's user avatar
2 votes
0 answers
15 views

Does Playwright Test support globalThis? (typescript/javascript)

I defined in global.d.ts file as the following declare global { var some: string } I assigned the value in global.setup.ts as the following globalThis.some = 'fff' I referred it in test file as ...
gyc voice's user avatar
0 votes
1 answer
26 views

Playwright running fine on my own desktop, but 403 Forbidden in AWS Ubuntu

I have an ubuntu pro 22.04 on AWS and use playwrigth to perform web scraping. I tested on my own computer and everything is OK. I also tested on AWS ubnutu, and the results showed that there was no ...
akuan10's user avatar
  • 111
0 votes
0 answers
11 views

How to customize msedge's command line options with playwright-python?

When I launch msedge manually, in edge://version I can find the command line options are --no-startup-window /prefetch:5 --flag-switches-begin --flag-switches-end If I start the same browser with ...
link89's user avatar
  • 1,189
0 votes
1 answer
25 views

monocart-reporter @owner tag will NOT attach to the test i'm running

I'm using playwright to run my e2e tests, and i've installed monocart-reporter https://www.npmjs.com/package/monocart-reporter#examples to try to add the "owner" tag for each test, so that ...
SomeoneLearning17's user avatar
0 votes
1 answer
114 views
+50

Why aren't my tests running in the expected order?

I have 1 test that runs significantly longer than others so I want that to start running first so others can be run in parallel with it. The test in the derived class is using Order(1), as is the ...
Keiggo's user avatar
  • 63
0 votes
2 answers
34 views

How to wait until the specific div gets loaded and hidden

Adding some tests using playwright. In one of the tests, When I click on save button, new div will get added to DOM and after some time div will be hidden in the DOM when the save operation gets ...
Kotana Sai's user avatar
  • 1,256

1
2 3 4 5
49