#6 - Page Object Model (POM) in Playwright with C# .NET

preview_player
Показать описание
In this video, we will discuss Page Object Model in Playwright with C# .NET and the ways to write better test code using the pattern to make our tests readable.

#playwright #playwrightdotnet #executeautomation #e2etesting
For more articles and videos, please follow
► [Twitter] @executeauto
► [Subscribe] @Execute Automation

New Series 2021
#############

Selenium and C#
******************

Selenium &Java
******************

CI/CD with Microsoft Technologies
*************************************

Docker & Kubernetes
************************

Mobile Testing
****************

Рекомендации по теме
Комментарии
Автор

You don't have login link on login page.
It will be better to separate LoginPageUpgraded to HomePage and LoginPage.
On HomePage will be LoginLink, and on Login page will be all other controls

ppp
Автор

replacing fields with methods or properties is not the best idea in this case. Under the shelve playwright searches for the Locator each time you apply\using it. So the purpose of the Locator field in the POM is just to store selector, so why you need to invoke method or property code each time you use the locator?

dmitriimolchanov
Автор

Hey so in this example of page object model you don't use the pagetest class and because of that you cant use tobevisible or other methods that haven't depreciated like isvisibleAsync, is there a work around for this??

carsonwardell
Автор

I cant stop thinking about that when you do the LoginPageUpgraded, you still do a code change. If you really wanted it to be nice and pretty, and less of a risk, then use a ILoginPage (Interface) and then just apply the e.g. LoginPage or LoginPageUpgraded in the dependency injection. Then you would only add code, and not change (other than in the DI).

Maybe its because its not supported? I havent tried it yet with PW

Feddersen
Автор

Hi, thank you for the video. Do you have an example for using Playwright Trace in hooks?

jomer
Автор

I redid this 5 times it just does not work, I just dont understand whats the reason to have two seperate classes of unit tests, one with nUnit one with playwright, but just show one of them having POM implementation...

sneikiusas
Автор

Just watched 7 part and saw that it was deleted :) Hey, u set here course " End to End Test Automation with Playwright (JS/TS/C#/Java)" as recommended. Can we speak somewhere with u about this one?

Vtvidio