Questions tagged [playwright]

Playwright is a Node.js library to automate the Chromium, WebKit and Firefox browsers. Playwright is similar to Puppeteer, but with cross-browser support.

Resources

264 questions
17
votes
1 answer

What is the difference between testing on Safari vs Webkit?

I'm looking at writing some E2E tests using Playwright. I can see that the library allows tests to be run against Chromium, Firefox and Webkit. My understanding is that Webkit is the underlying engine of Safari, and Chromium is the base of Chrome…
user1087943
  • 339
  • 1
  • 4
  • 15
6
votes
2 answers

How to read a textbox value from a playwright

I have input text field on the page with id "email30" and I am trying to read it's value from Playwright let dd_handle = await page.$("#email30"); let value = await dd_handle.getAttribute("value"); However it come back "" although I have a…
Paresh Varde
  • 904
  • 2
  • 12
  • 34
5
votes
0 answers

Firefox headless not working within Docker as non-root user

As the title says, I'm having trouble running Firefox in headless mode inside a Docker container as a non-root user. Consider the following Dockerfile, built with docker build -t firefox . FROM python:3.8-buster RUN apt-get update -qq \ &&…
elacuesta
  • 778
  • 3
  • 15
5
votes
1 answer

Playwright Error: Firefox revision is not downloaded. Run "npm install" or "yarn install"

const playwright = require("playwright"); (async () => { const browsers = ["chromium", "firefox", "webkit"]; for (const browserType of browsers) { const browser = await playwright[browserType].launch({args: ['--no-sandbox']}); const…
Ashik
  • 1,011
  • 10
  • 24
4
votes
1 answer

What's the benefit of E2E testing only against latest browser versions

When performing end-to-end tests with tools such as Playwright, Puppeteer and Cypress, I believe all of them (except the latter, pardon me if I'm wrong) only allow you to use the very latest version of each browser which is bundled along with every…
zanona
  • 11,379
  • 24
  • 78
  • 137
4
votes
1 answer

missing dependencies when running playwright in docker

I tried to run the playwright in docker but got this error: browserType.launch: Host system is missing dependencies! Missing libraries are: libvpx.so.6 libicui18n.so.66 libicuuc.so.66 libwoff2dec.so.1.0.2 libharfbuzz-icu.so.0 …
Dustin Le
  • 41
  • 3
4
votes
1 answer

How to check if an element exists on the page in Playwright.js

I am using playwright.js to write a script for https://target.com, and on the page where you submit shipping information, it will provide the option to use a saved address if you have gone through the checkout process previously on that target…
cole
  • 43
  • 1
  • 3
4
votes
3 answers

Using Playwright for Python, how do I select an option from a drop down list?

This is a followup to this question on the basic functionality of Playwright for Python. How do I select an option from a drop down list? This example remote controls a vuejs-webseite that has a drop down list of fruits like "Apple", "Banana",…
576i
  • 5,070
  • 3
  • 33
  • 71
4
votes
0 answers

playwright Error: UnhandledPromiseRejectionWarning: TimeoutError: waiting for firstPage Proxy failed: timeout 30000ms exceeded

const playwright = require("playwright"); (async () => { for (const browserType of ["chromium", "firefox", "webkit"]) { const browser = await playwright[browserType].launch(); const context = await browser.newContext(); const page =…
Ashik
  • 1,011
  • 10
  • 24
3
votes
0 answers

Azure AD Based SSO using Playwright

How do we test SPAs which have Azure AD based authentication? When user opens the app, user is first sent to login.microsoftonline.com and on entering the user email the page redirects back to application home page. In this scenario, how do we…
code_blue
  • 363
  • 1
  • 8
  • 16
3
votes
2 answers

In Playwright for Python, how do I retrieve a handle for elements from within an frame (iframe)?

I have successfully used Playwright in python to get elements from a page. I now ran into to challenge of getting elements from a document embedded within an iframe. As an example, I used the w3schools page explaining the
buddemat
  • 1,992
  • 6
  • 9
  • 23
3
votes
2 answers

How to open the new tab using Playwright (ex. click the button to open the new section in a new tab)

I am looking for a simpler solution to a current situation. For example, you open the google (any another website) and you want BY CLICK on the button (ex. Gmail) - open this page in the new tab using Playwright. let browser, page,…
Olya
  • 41
  • 4
3
votes
1 answer

How to handle multiple pages with playwright-python?

How to listen for new pages with playwright-python? In JavaScript it will be documented as: const playwright = require("playwright"); (async () => { const browser = await playwright.chromium.launch(); const context = await…
LeMoussel
  • 4,291
  • 5
  • 53
  • 98
3
votes
2 answers

Can I set the date for playwright browser

When I write tests to run in playwright, I would like to be able to set the date that the browser believes it to be at the start of the test. Is there a way to achieve this using playwright?
Billy Moon
  • 52,018
  • 22
  • 123
  • 222
3
votes
1 answer

Maintain Login Session after first browser instance in playwright

I am running multiple instances of chromium with playwright. On each instance i am logging in with the same credentials. Is there a way to automatically login into the other browser instances when i have already logged in to the first browser…
SWarr
  • 79
  • 6
1
2 3
17 18