Playwright - Test (React)

Playwright - Test (React)

?

Playwright is an open-source test automation library initially developed by Microsoft contributors. It supports programming languages such as Java, Python, C#, and NodeJS. Playwright comes with Apache 2.0 License and is most popular with NodeJS with Javascript/Typescript. This Playwright tutorial will help set up with NodeJS using Visual Studio Code.

Playwright can enable based on the below configuration steps in React,

1.?????Install the playwright package

?? npm init playwright@latest
?        

2.?????Write sample playwright test case

import { test, expect } from '@playwright/test';

?

test('test', async ({ page }) => {

?await page.goto('https://localhost:3000');

?

?await page.locator('href=settings').click();

?await expect(page).toHaveURL('https://localhost:3000/settings');

});

?

3.?????Run the playwright all test cases

npx playwright test

4.?????Check the playwright test cases out reports

?

npx playwright show-report

要查看或添加评论,请登录

Murugan K的更多文章

  • .NET Aspire

    .NET Aspire

    .NET Aspire is a cloud-native development stack for building distributed applications in .

    1 条评论
  • Deployment Slots

    Deployment Slots

    Azure Deployment Slots are a feature of Azure App Service (used for hosting web apps, mobile app backends, and APIs)…

  • Microservice - Circuit Breaker Pattern

    Microservice - Circuit Breaker Pattern

    A circuit breaker is a design pattern used in software development to improve the resilience and fault tolerance of…

    1 条评论
  • Docker

    Docker

    Docker is a containerization platform which packages your application and all its dependencies together in the form of…

    1 条评论
  • RabbitMQ

    RabbitMQ

    RabbitMQ serves as a message broker, responsible for sending and receiving messages through queues. RabbitMQ…

    3 条评论
  • Strategy Design Pattern

    Strategy Design Pattern

    Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary…

    2 条评论
  • Deployment Groups

    Deployment Groups

    Deployment Groups In simple terms, a deployment group is a collection of machines (e.g.

  • Advanced Web Application Architecture

    Advanced Web Application Architecture

    This base application architecture helps to define the latest pattern.

    1 条评论
  • Clean Architecture

    Clean Architecture

    Clean architecture puts the business logic and application model at the center of the application. Instead of having…

  • Azure Notification Hub

    Azure Notification Hub

    Azure Notification Hubs provide an easy-to-use and scaled-out push engine that enables you to send notifications to any…

社区洞察

其他会员也浏览了