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.

Resources

2380 questions
0
votes
2 answers

In Playwright testing, how to click on Material UI datepicker button?

I am having trouble selecting the datepicker button to open the calendar, so I can select a date. The codegen runner suggests using the following code: await page.getByRole('button', { name: 'Choose date, selected date is Feb 14, 2023'…
arecaps
  • 155
  • 1
  • 10
0
votes
1 answer

Playwright: toHaveAttribute is not working when checking the Meta Keywords

I wanted to verify the meta keywords in our site. To verify, I used toHaveAttribute and this xpath: page.locator('[name="keywords"]'); My scenario is: Go to view page source Locate the meta keywords: Verify if the expected and actual string…
0
votes
1 answer

Playwright: How to handle long-loading ads preventing DOMContentLoaded event from firing during page navigation?

I'm using Playwright Java version 1.28.1 to test my company's website. I'm trying to navigate to the website using the following code: page.waitForLoadState(LoadState.DOMCONTENTLOADED); page.navigate("https://my-company-website.com/"); The problem…
Aniket
  • 4,926
  • 12
  • 41
  • 54
0
votes
0 answers

Playwright: Error keyboard.press: Target closed

I am trying to open the view page source using playwright but cant proceed because of Target closed error. Below is my step or scenario: Access the page: https://www.orangehrm.com/ And press Control U to access View page source. Here is my…
0
votes
1 answer

How to deal with modifying global state of system under test?

I am trying to run a test that verifies the functionality of some system global state variables. For example: "enable feature A, test that feature A works, disable feature A, test that feature A no longer works". I cannot create a separate system…
BobtheMagicMoose
  • 2,246
  • 3
  • 19
  • 27
0
votes
0 answers

How do you pause a download (in firefox) using the python module Playwright?

The documentation doesn't seem to give a method for it, but surely something basic like that should be possible? How can I do this, then? Many thanks.
0
votes
1 answer

Playwright get objectId from ElementHandle like Puppeteer element.remoteObject().objectId

Is it possible to get objectId from ElementHandlelike in Playwright like in Puppeteer element.remoteObject().objectId? Thanks! In puppeteer: let elementHandle = await page.evaluateHandle(() => document.querySelector('a')); let objectId =…
Alex
  • 388
  • 3
  • 4
0
votes
0 answers

Problems when trying to init playwright without sudo. Permission errors

I have been trying to start playing with playwright, and after I create a file and type in traminal. npm init playwright@latest type hopopa@C10953 tau-playwright % npm init playwright Getting started with writing end-to-end tests with…
0
votes
0 answers

Playwright +Browserstack + Cucumber JS

I am able to integrate playwright with browserstack in my POM Framework successfully, But when I tried to integrate with cucumber framework throwing socket error when it tries to establish the connection with endpoint getting websocket error any one…
0
votes
2 answers

Expect value of a dropdown select based on option text

We have a dropdown select In playwright we can use to check the…
M András
  • 29
  • 4
0
votes
0 answers

Speed up Playwright scraping project with .NET during development

I'm using Playwright with .NET 7, for web scraping (not testing). The major downfall compared to the Node tooling, is that it slows down my developer inner loop, due to the compilation before each run. I'm not referring to it "in production", where…
lonix
  • 14,255
  • 23
  • 85
  • 176
0
votes
0 answers

npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\1\s\package.json'

Getting the following error when running playwright tests on azure pipeline Please advise how to resolve the error Node 16.16.0 C:\\Windows\\system32\\cmd.exe /D /S /C "C:\\hostedtoolcache\\windows\\node\\15.0.0\\x64\\npm.cmd…
Aliona
  • 1
0
votes
0 answers

How to pass different URLs via command line in Playwright

I am using two URLs for dev and stg environments. These two environments also have different URL for API calls. This is my .env…
1449
  • 21
  • 5
0
votes
0 answers

In Playwright Single Page App wouldn't rendered correctly

I test a single page app with Playwright. Now I have Playwright updated to version 1.31.2. After that the View of the app wouldn't rendered correctly. The inner views are shifted down. I have tested many view and context options. But nothing works…
0
votes
0 answers

Playwright support mobile browser execution?

How does the playwright support the mobile browser execution. It will generate the emulator by using desktop browser instead of real devices to emulate mobile devices. If i am using any of the third party like Sauce lab. Is there possible to execute…
Ramesh
  • 88
  • 5
1 2 3
99
100