Questions tagged [playwright-dotnet]
75 questions
4
votes
2 answers
Access to Sibling element in Playwright
I have two sibling spans in my DIV. I am doing E2E testing in Blazor and I want to access the second Span content (@Status).
Status:
@Status
I found a solution for it, if it was JavaScript…
Sharif Yazdian
- 4,332
- 3
- 20
- 22
4
votes
3 answers
Playwright in Docker not working: Microsoft.Playwright.PlaywrightException: Executable doesn't exist
I have a .net dashboard application where a user can export the current page as pdf via playwright.
This works locally, however, when I run the application in Docker I get this error:
Microsoft.Playwright.PlaywrightException: Executable doesn't…

here_for_help
- 51
- 1
- 4
4
votes
1 answer
Playwright "Element is not attached to the DOM"
I am trying to scrape a website using Playwright (.NET). The website looks like it was written in the early 2000s (running in quirks mode and all), and I'm running into an issue that I can't seem to find a solution for.
My goal is to check a…

stellr42
- 3,365
- 2
- 21
- 33
3
votes
0 answers
Playwright button click works unpredictably
I have at least three options to click on a button:
await page.Locator("button", new() { HasText = "Создать" }).ClickAsync();
await page.GetByRole(AriaRole.Button, new() { Name = "Создать" }).ClickAsync();
await page.GetByText("Создать")…

EgoPingvina
- 734
- 1
- 10
- 33
2
votes
1 answer
Launching a in memory server to test Blazor Wasm using Playwright
I've been looking at Playwright as a replacement for Selenium to process end-to-end tests. I would like to run the tests in memory, as there are many benefits from using mock services and removing all the set-up or tear-down.
I've been finding it a…

ca53rlb
- 77
- 5
2
votes
1 answer
Playwright - Select element based on CSS property
I need to select the appropriate element with Playwright by filtering based on CSS properties. In my particular case, I need to filter out the elements that have the text-decoration:line-through property and focus on the rest of them.
Here is the…

user2173353
- 4,316
- 4
- 47
- 79
2
votes
3 answers
How to click a "type=submit" button in Playright
I tried any possible way to click a "type=submit" button in a form, but it doesn't click the button, the only way is by using "text = ' Register '" but I can't use the text because the form language may change based on the UI language selected by…

Onixy
- 35
- 1
- 5
2
votes
5 answers
Microsoft Playwright for .NET NUnit, cant launch tests in headed mode
Im starting to use Playwright to automate my tests for a Blazor WebAssembly application, i created a new NUnit Test project and following the docs on playwright.dev i installed:
dotnet add package Microsoft.Playwright.NUnit
doing so i can inherit…

Ivan Ambla
- 763
- 5
- 24
2
votes
1 answer
System.TimeoutException : Timeout 30000ms exceeded Playwright with .net 5 core application
Is there any global setting for the .net application to overwrite the default configuration of the playwright? On the playwright documentation for node.js, it has documentation, however for the .net application there is a missing page and how can I…

San Jaisy
- 15,327
- 34
- 171
- 290
1
vote
1 answer
Calling .net functions in javascript automation
I am barely starting to work with the Playwright and almost don’t have a programming background, therefore my question may sound stupid. I am a test lead and we want to start our automation journey with testers, that have some javascript…

Rol
- 11
- 1
1
vote
1 answer
Use OneTimeSetUp with Playwright C#
I am trying to use the "[OneTimeSetUp]" attribute in my TestFixture but I am receiving a NullReferenceException on "Page"? I am using Microsoft.Playwright.NUnit. I can use the "[Setup]" attribute fine but just not the "[OneTimeSetup]"?
I am trying…

user500770
- 11
- 2
1
vote
3 answers
Get immediate sibling of locator using PlayWright
This is the DOM structure:
…

lonix
- 14,255
- 23
- 85
- 176
1
vote
2 answers
How do I get elements in a table with Playwright?
I'm trying to get hold of two users in a hideous structure with tables within tables and I'm just not getting it to work...
The structure is something like this (inner most table):
…
![]()
Fredrik Thörnblad
1
vote
0 answers
Playwright + C# tests: pass in Debug mode but fail in headless mode: LocatorAssertions.ToBeVisibleAsync with timeout 5000msHello dear Playwright community! I am pretty new to this thing, and I ran into a problem as soon as I tried to write some basic form validation UI tests.
When I run my code step-by-step, it passes, so the logic seems to be correct. However, when I…
![]()
nadya.wyn
1
vote
3 answers
Connecting to an existing browser using PlaywrightI'm using Playwright in "library mode". The typical approach is: create Playwright instance, launch browser, create context, create page, go to URL.
But there are also ConnectAsync and ConnectOverCDPAsync which allow connection to an existing…
![]()
lonix
|