Questions tagged [playwright-dotnet]

75 questions
0
votes
1 answer

Run some action as soon as any page loaded in Playwright

I want to run some actions as soon as any page is loaded in Playwright (in library mode): load page A run common post-load actions <--- run specific actions for page A load page B run common post-load actions <--- run…
lonix
  • 14,255
  • 23
  • 85
  • 176
0
votes
0 answers

How to use cross browser testing in Specflow Playwright C# linking with specflow.actions.json

My JSON file is: specflow.actions.json file { "target": { "defaultTimeout": 60, "headless": false, "traceDir": "traces" } } My custom json file I am willing to use for targetting different browsers and OS { "BrowserTypes": [ …
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

How to connect to same instance of chromium using Playwright Dotnet from different processes

I use Playwright DotNet in order to enable SEO for my SPA react application. I have several websites on the same server and I would like all of them to maintain connection (being attached) to the same browser instance in the machine. In case the…
Thanasis Ioannidis
  • 2,981
  • 1
  • 30
  • 50
0
votes
1 answer

Playwright opens cmd

When I run a playwright code in C#, it opens up many cmd windows: This is the code I use: using (var playwright = await Playwright.CreateAsync()) { var browser = await playwright.Chromium.LaunchAsync(new…
Dorel
  • 103
  • 12
0
votes
1 answer

In Playwright for Typescript, If it is possible to convert 'Page' to 'Document' or 'Element'

I am try to traverse the Dom Tree structure to determine whether each element exceeds the boundary of its parent element with Playwright Typescript. But seems that I can't use "Document" directly to traverse the dom tree, do we have a way to mapping…
0
votes
0 answers

how to specify configuration(specifically reporter to be used) in playwright-dotnet

I'm beginner in C#.net. Is there a way to have a configuration file for playwright-dotnet similar to playwright.conf.js(js version). As the config file made it easier to specify most configurations in one place! There is no mention of config in…
max
  • 1
  • 1
0
votes
1 answer

Cannot open new tab in the same context in Playwright (c#)

I'm trying to open new tab in the same browser session and switch context to it. When I do it with following code: await BrowserSession.Browser.Contexts[0].NewPageAsync(); I got the error: Please use Browser.NewContextAsync() await…
0
votes
1 answer

How to check page in new tab in Playwright (C#)

I want to create the test Click on element with middle button on the mouse Verify content of page in new tab I know how to create new Browser context, but I don't know how to switch to new page. Thank you for any help in advance.
laxsore
  • 143
  • 1
  • 2
  • 9
0
votes
0 answers

Playwright with .NET, wait for spinner to load, problem in Azure Devops

I'm struggling with UI Automation tests when i want to integrate them into Azure Devops Pipeline. I am using playwright with specflow in .net in order to create UI tests, on my local machine everything works as it should without any flakiness. The…
Reedy
  • 1
0
votes
0 answers

Check if page is idle in playwright

I have some pages in my context. I trigger multiple requests like this, without waiting to complete/load the page: //Trigger without await page1.GotoAsync("https://slowWebsite.com"); page2.GotoAsync("https://fastWebsite.com"); //page3 you stay…
ehsan_kabiri_33
  • 341
  • 6
  • 13
0
votes
0 answers

c# dotnet: why websocket unable to get local issuer certificate?

I deployed moon2 helm chart on my Kuberntes cluster, i deployed cert-manager with letsencrypt . When i launch my automated test (wrote with c# language with playwright framework), i got the following error: Microsoft.Playwright.PlaywrightException…
Mohamed
  • 239
  • 1
  • 4
  • 17
0
votes
0 answers

NUnit Playwright - Multiple inheritance BaseTests and PageTest

How to achieve the equivalent of multiple inheriting from a custom BaseTests class and Playwright's PageTest class? Problem I have 2 types of tests in my application: Non-playwright and Playwright-ones. Both types share common SetUp code found in…
Hossam El-Deen
  • 972
  • 1
  • 13
  • 27
0
votes
0 answers

Playwright MSTest injected Page object gets reset on every TestMethod

I started using Playwright in MSTest and I have my test class implement the base PageTest class. One thing I am wondering: Is the instance of the injected Page object gets reset on every TestMethod? I tried to log the Page.URL on every TestMethod…
raberana
  • 11,739
  • 18
  • 69
  • 95
0
votes
2 answers

Playwright Multiple Elements - Is there an equivalent to Selenium FindElements?

Using playwright C# I've been trying to work with multiple elements that use the same locator. Is there any functionality in playwright which is equivalent to the FindElements method from selenium? This method allows us to store multiple elements of…
bobe_b
  • 187
  • 1
  • 2
  • 21