Skip to content

LambdaTest/smartui-typescript-playwright-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run SmartUI Visual Tests with Playwright TypeScript on TestMu AI (Formerly LambdaTest)

Made by TestMu AI Playwright version Community

Getting Started

TestMu AI (Formerly LambdaTest) is the world's first full-stack AI Agentic Quality Engineering platform that empowers teams to test intelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with 10K+ real devices and 3,000+ browsers. With AI-native test management, MCP servers, and agent-based automation, TestMu AI supports Selenium, Appium, Playwright, and all major frameworks.

With TestMu AI (Formerly LambdaTest), you can run SmartUI visual regression tests using Playwright with TypeScript across real browsers and operating systems.

Prerequisites

  • Node.js installed (version 14 or higher)
  • NPM installed (version 7 or higher)
  • A TestMu AI (Formerly LambdaTest) account

Setup

Clone this repository to your local machine.

git clone https://github.com/lambdatest/smartui-typescript-playwright-sample.git

Navigate to the project directory and install the required dependencies.

cd smartui-typescript-playwright-sample
npm i

Set your credentials as environment variables.

macOS / Linux:

export LT_USERNAME="YOUR_USERNAME"
export LT_ACCESS_KEY="YOUR_ACCESS_KEY"

Windows:

set LT_USERNAME="YOUR_USERNAME"
set LT_ACCESS_KEY="YOUR_ACCESS_KEY"

SmartUI Screenshot Webhook

This sample uses the smartui.takeScreenshot webhook to capture screenshots for visual regression testing. When you call this webhook, you can pass additional arguments such as fullPage and screenshotName. The fullPage argument indicates whether the screenshot should capture the entire page or just the viewport. The screenshotName argument lets you provide a custom name for the screenshot, which is used when saving it and displaying it in the SmartUI dashboard.

Here is an example of how to use the smartui.takeScreenshot webhook in your test script:

await page.evaluate((_) => { },
    `lambdatest_action: ${JSON.stringify({ action: "smartui.takeScreenshot", arguments: { fullPage: true, screenshotName: "Your Screenshot Name" } })}`);

This captures a full-page screenshot and saves it with the provided custom name. The captured screenshot will be available for review and comparison in your SmartUI dashboard.

By leveraging the smartui.takeScreenshot webhook at different stages of your test execution, you can detect and analyze visual differences across various browser and device combinations and ensure that your web application looks and functions as expected.

Run tests

npm test

View results on your TestMu AI dashboard.

Contributions

Contributions are welcome. Open an issue to discuss your idea before submitting a pull request. When reporting bugs, include your Node.js version, OS, and Playwright version.

TestMu AI (Formerly LambdaTest) Community

Connect with testers and developers in the TestMu AI Community. Ask questions, share what you are building, and discuss best practices in test automation and DevOps.

TestMu AI (Formerly LambdaTest) Certifications

Earn free TestMu AI Certifications for testers, developers, and QA engineers. Validate your skills in Selenium, Cypress, Playwright, Appium, Espresso and more. Industry-recognized, shareable on LinkedIn, and built by practitioners, not marketers.

Learning Resources by TestMu AI (Formerly LambdaTest)

Learn modern testing through tutorials, guides, videos, and weekly updates:

LambdaTest is Now TestMu AI

On January 12, 2026, LambdaTest evolved to TestMu AI, the world's first fully autonomous Agentic AI Quality Engineering Platform.

Same team. Same infrastructure. Same customer accounts. All existing LambdaTest logins, scripts, capabilities, and integrations continue to work without change.

👉 Find the new home for LambdaTest.

How LambdaTest Evolved into TestMu AI

In 2017, we launched LambdaTest with a simple mission: make testing fast, reliable, and accessible. As LambdaTest grew, we expanded into Test Intelligence, Visual Regression Testing, Accessibility Testing, API Testing, and Performance Testing, covering the full depth of the testing lifecycle.

As software development entered the AI era, testing had to evolve, too. We rebuilt the architecture to be AI-native from the ground up, with autonomous agents that plan, author, execute, analyze, and optimize tests while keeping humans in the loop. The platform integrates with your repos, CI, IDEs, and terminals, continuously learning from every code change and development signal.

That evolution earned a new name: TestMu AI, built for an AI-first future of quality engineering. TestMu is not a new name for us. It is the name of our annual community conference, which has brought together 100,000+ quality engineers to discuss how AI would reshape testing, long before that became an industry norm.

What started as a high-performance cloud testing platform has transformed into an AI-native, multi-agent system powering a connected, end-to-end quality layer. That evolution defined a new identity: LambdaTest evolved into TestMu AI, built for an AI-first future of quality engineering.

Support

Got a question? Email support@testmuai.com or chat with us 24x7 from our chat portal.

About

Run SmartUI Visual Tests with TypeScript Playwright on TestMu AI (Formerly LambdaTest).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors