3,516 questions
0
votes
0
answers
10
views
Playwright: Unable to enter formula in Excel Online cell (A1) despite clicking and focusing
I'm automating Excel Online using Playwright (TypeScript) and trying to enter =TODAY() in cell A1. However, despite clicking the cell, moving the mouse, and even double-clicking, the formula isn't ...
2
votes
0
answers
22
views
PlayWright (python)- Failed to install browsers designated as channels (i.e. chrome-beta) in Powershell / Windows 11
I am working on cross-platform tools that use PlayWright. The tools need both the managed browsers and production browsers (seem to be denoted as channels). Installing channels work fine in MacOS ...
0
votes
0
answers
11
views
Exceljs and playwright: Problems with the scope a variable into playwright
I try to read information from a excel file through 'exceljs'. I put into a variable a data from the excel file and then, I try to use this variable to fill a form of a webpage through playwright. ...
0
votes
0
answers
19
views
Getting gibberish file when trying to download a mp3 file using playwright
So, I am trying to create a scraper for a online playlist and using playwright as I have been trying my hand at this framework but when downloading a mp3 file, no matter whatever I try using different ...
0
votes
0
answers
24
views
--only-shell and --no-shell fails Playwright deps installation on CI [closed]
Updated playwright to the latest 1.50 version.
channel: "chromium" added to playwright.config.ts as described in the docs
On CI added command
yarn playwright install-deps chromium --only-...
0
votes
0
answers
17
views
Nuxt Middleware in Playwirght e2e-tests
I use Nuxt Auth Utils which works great, but in my e2e-tests I can't access my protected pages because I check if the user is logged in (useUserSession()) with my middleware.
Can I simulate ...
0
votes
2
answers
41
views
I get no HTML Code in an IFrame with page.content() in Playwright
I use Playwright with the
page.getContent();
Bud I do not get the HTML Code from any IFrame.We use Java.
<html>
<body>
<iframe>
I NEED THIS HTML CODE
</iframe>
</body>
&...
0
votes
0
answers
32
views
Why do I get "Error: browser.newPage: Target page, context or browser has been closed" on browser.newPage()?
I am trying to run console integration tests in a single worker and all of my tests are run in serial mode.
I have made a test fixture to override the browser with our custom one
export const test = ...
0
votes
0
answers
25
views
Long testing time in Playwright
I have simple tests, default in the example.spec.ts file. Before hooks alone takes a long time for such a simple case. I have already limited the tests to only one browser and even then, having two ...
-1
votes
0
answers
14
views
Accessing LocalForage in Playwright tests [closed]
im trying to test a project with playwright. This project has a mock file system in indexeddb using localforage. Localforage is installed as an npm package in the (React) project.
As I understand, ...
0
votes
0
answers
15
views
ScrollTo function does not always work in Firefox, it just scrolls to the top of the page
We have a test where I want to check if a network call is triggered when you scroll away from an item, and scroll back to that same item but the item is only 30% in view.
In this case, you should not ...
0
votes
1
answer
36
views
Javascript: Playwright throwing an uncatchable error [closed]
I am using Playwright with extra and the stealth plugin. The below code randomly throws an error. Sometimes it downloaded 1000's of pages before failing.
What I do not understand is why the try/catch ...
0
votes
0
answers
27
views
Error: page.evaluate: SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document [closed]
I'm using the following code to get the user's access token
public async getAccessToken(): Promise<string> {
const accessToken: string = await this.page.evaluate(() => {
...
2
votes
0
answers
65
views
Response is captured, but waitForResponse is timing out
I am struggling with the waitForResponse function in Playwright. My test is below. What I would like to happen is for the response to be waited for, identified, and for the response body to be made ...
0
votes
2
answers
74
views
How to Scrape a JavaScript-Rendered Table? (wait_for_selector Timeout & Data Not Loading) [closed]
I'm trying to scrape a table from a webpage, but the table is dynamically loaded via JavaScript and appears 5-7 seconds after page load when viewed manually.
However, when using a web scraper, the ...
-2
votes
2
answers
61
views
How can i resolve the error "Event loop is closed! Is Playwright already stopped?" [closed]
I am working with Playwright in Python and facing an issue with the retry logic when an action fails.
The idea is that if the action fails on one attempt, the code should retry up to a maximum of 8 ...
-2
votes
0
answers
23
views
How execute test with multiple browser and multiple workers without conflict of data in playwright [closed]
In playwright there is a file with 3 test which creates a data based on current date and time. The test is executing in multiple browser with 2 workers. When executing , chrome and firefox are running ...
-1
votes
0
answers
24
views
Are axe-core rules conform to older rules?
I'm using "@axe-core/playwright": "^4.10.1" with playwright "@playwright/test": "^1.50.1".
The website I'm checking has a known issue, an empty <title> ...
4
votes
0
answers
58
views
Window in not defined using Playwright and custom web components [closed]
I have a component library that exports a lot of custom web components. The components are registered using:
window.customElements.define('my-component', MyComponent);
When I try to run playwright ...
0
votes
0
answers
55
views
Invoking Playwright from Java code failing with "Failed to install browsers"
I am trying to invoke Playwright in Java and it is failing with
Exception in thread "main" java.lang.RuntimeException: Failed to create driver
at com.microsoft.playwright.impl.driver....
-2
votes
0
answers
65
views
The value of count is changing . why is that happening? [closed]
For this code for a playwright test case, both the if condition and the else condition runs when the count value is 5.
I am not updating the count value anywhere or re-fetching it. Does NodeJS does ...
0
votes
0
answers
19
views
Connecting to Vertica DB from Playwright script
I am new to playwright (Automation tool).
Scenario: Need to connect to Vertica DB, fetch required record and compare the result with UI values.
I am using following Javascript through which I am able ...
-2
votes
0
answers
35
views
Can Playwright be run inside a browser tab to control an iframe that's in the tab itself?
Weird use case, I need to display some reports but they are behind a login screen and need to be clicked into. Easy task if you're using playwright to open the browser and navigate there.
However I'd ...
-1
votes
0
answers
49
views
.Net Playwright how to create test results reporter [closed]
I've started to look at using .Net Playwright as our test automation framework. We will be running these tests in Jenkins so I'd like to attach a results report to the email that is sent out to the ...
1
vote
0
answers
41
views
When using playwright and coroutine for web crawling, the speed is the same as when using coroutine and not using it
package com.example.demo.service
import com.example.demo.dto.BookDTO
import com.microsoft.playwright.*
import com.microsoft.playwright.options.WaitUntilState
import jakarta.transaction.Transactional
...
0
votes
0
answers
50
views
How to handle AWS Cognito Multi-Factor Authentication (email code) in 'Playwright' tests? [closed]
I'm writing E2E tests with Playwright for an application that uses AWS Cognito authentication with email-based MFA. Here's my current flow:
User clicks "Sign In" on my app
Gets redirected ...
1
vote
2
answers
77
views
Playwright container cannot reach web service container in GitLab CI/CD
I am trying to run Playwright tests within a GitLab CI/CD pipeline against a web service running in a Docker container. My gitlab-ci.yml looks like this:
stages:
- test
services:
- docker:27-dind
...
0
votes
2
answers
82
views
Playwright Python can't find HTML tag which shows up in debugger and in a print statement
I am trying to scrape a page product detail page
but I am not able to find the tag when the code runs. I print the parent tag out, and I see the h2 tag I want, and also when I enter the debugger I can ...
0
votes
1
answer
74
views
Playwright uses old browser version
I'm a bit of a Playwright noob, and I have a problem getting my Python scripts to run using the latest version of Firefox.
Any .py script I run will open in version 95.0. Same thing if I run ...
1
vote
2
answers
78
views
Playwright - report beforeAll and afterAll as separate test
The results/errors in beforeAll() and afterAll() are currently added to respectively the first and last test. In our case quite a lot already happens in these methods. If an error occurs in e.g. the ...
0
votes
0
answers
39
views
Cannot set port for playwright test server nuxt 3/playwright
I have a Laravel 11 backend with a Nuxt 3 frontend project. I am use Laravel Sanctum which requires setting which domains/port can be used for authentication. Because of this, I need to use port 3000 ...
1
vote
0
answers
105
views
How to achieve high FPS screen recording of HTML animations using Playwright? [closed]
I'm working on a Python script to record HTML animations using Playwright. The script takes screenshots of animated HTML pages and combines them into a video using FFmpeg. However, I'm encountering ...
1
vote
2
answers
114
views
How to log information in Playwright so that it shows up in trace viewer similar to test.step?
When I have code like this, the text passed to the step function shows up in the Playwright trace viewer:
await test.step("Navigate to the blog home page and confirm it is loaded.", async () ...
2
votes
1
answer
70
views
can't find correct 'select' HTML tag value, and trying to wait for a select option to load, playwright Python
I have an issue where I use a url that ends such as T-shirts page
I am trying to scrape the product links off the pages. I have been trying for some time now, nothing is working yet. This is my ...
0
votes
0
answers
78
views
TypeError: Failed to fetch when uploading CSV file using Playwright and Python
Environment:
Python with Playwright
Running on localhost:8000
Chrome browser in headed mode
Problem:
I'm trying to upload a CSV file using Playwright with Python, but I'm getting the following errors ...
0
votes
1
answer
40
views
Unable to run Playwright test scripts in debug Mode
I'm trying to learn Playwright, so I was checking Playwright Inspector concept and written below piece of code. In Pycharm terminal I run the below i.e. set PWDEBUG=1 and use pytest
PWDEBUG=1 pytest -...
0
votes
0
answers
91
views
How can I create a valid Dockerfile for my NUnit Playwright test project?
I need to be able to create a Docker image of my Nunit Playwright test project, but I am having a lot of trouble understanding which runtime image to use and then finally if I need to install ...
1
vote
1
answer
80
views
v2 reCaptcha from Playwright-recaptch is inconsistent
We use enterprise anchor google image reCaptcha in our website and while automating it with our test framework(playwright and python) with this plugin, for the first few runs it's working but then ...
0
votes
0
answers
48
views
Unable to using createnode in extent reports
Beforefeature ---
ExtentTest feature = extentReports.CreateTest<Feature>("Name of Feature");
Before Scenario
ExtentTest scenario = feature.CreateNode<Scenario>("Name of ...
0
votes
0
answers
28
views
'Browser' object has no attribute 'get_playwright_browser'
Am trying to develop a code that uses browser-use and playwright to open a website, and apply on jobs. I have automated the login and search and only want AI to kick in when the code has searched the ...
0
votes
1
answer
50
views
Redirects https to http
I have the following playwright setup
// playwright.config.ts
export const STORAGE_STATE = 'tests/e2e/storageState.json';
...
projects: [
{
name: 'Log into Wordpress',
testDir: './...
0
votes
1
answer
53
views
Playwright CLI - Exclude specific folder/sub-folder
I have a playwright project that has many sub folders under the tests folder, for example a, b, and c.
In a specific scenario on one of my pipelines I need to exclude the folder c using Playwright CLI....
0
votes
0
answers
70
views
WooCommerce Order Status Not Updating via API in Automation Testing, But Works Manually
We have a plugin called FlexOrder, whose main functionality is to sync WooCommerce orders with Google Sheets and access them there. One of its key features is updating the order status by selecting ...
0
votes
0
answers
43
views
Playwright Launch Persistent Context doesn't work in Docker
Background:
I have a chromium user-data folder which contains a logged-in Instagram account. I want playwright to launch using persistent context from the user-data folder, open Instagram, and take a ...
0
votes
0
answers
44
views
What resource types to filter out to make the scraper avoid unnecessary requests in scrapy-playwright
Description
I am trying to scrape a site https://slickdeals.net/computer-deals/ . I am trying to get the name, price, and discounted price of the products listed
Now when i run a script to scrape the ...
1
vote
0
answers
43
views
How to pass parametrize values as well as APIcontext with in test so the I get separate result
I am trying to play around playwright/Pytest API testing.
I need to read data from xlsx file and returning dictionary in the form for TC_NAME,BODY,Result.
I have used Custom decorator method to make ...
0
votes
1
answer
71
views
Local storage not found
I got some trouble while I tried to safe a JWT in local storage, which is then used in all tests.
The JWT is used to be send with each action on the page.
I read the docs, but the problems can not be ...
0
votes
2
answers
53
views
AttributeError: 'NoneType' object has no attribute 'fill' [closed]
using Playwright automation I would like to insert email into a simple input field:
The site code how the Input is defined:
My code in Playwright:
form = page.locator("#register-email")....
0
votes
0
answers
145
views
Playwright tests stuck and not timing out
I'm running a lot of UI tests in a pipeline via a GitLab Runner. The test are run on VMs in the GCP in docker containers.
Most of the time this works without problems, but sporadically a job running ...
-3
votes
2
answers
97
views
What is flaky in Playwright locator DOM state getters?
We are using Chai JS assertions with Playwright, e.g.
await page.locator('input.checkbox').check();
assert.isTrue(await page.locator('button.submit').isEnabled());
However, locator.isEnabled() ...