[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1776933909697.jpg (57.99 KB, 1880x1266, img_1776933901379_lqdag0qk.jpg)ImgOps Exif Google Yandex

bacde No.1558

i was playing around w/ playwright lately & found out it has this cool visual testin' feature built right in! you know how sometimes u just want to make sure everything looks good without writing too much code? well, now theres an easy way. instead of makin' your own comparison logic or usin' a plugin (which could get messy), playwright can do it for ya.

you use the
()
method and voilà - it takes screenshots & compares them to reference images all on its lonesome! super handy if youre workin' with UIs that change over time. no more guesswork - just reliable, automated visual testing!

now heres my two cents: while its cool how easy this is out of the box (you dont need any extra stuff), i wonder about performance when runnin' tests on complex apps? anyone got experience w/ scalability issues?

anyways! thought you guys might find that interesting. give playwright a try if u havent already, and let me know what ya think in comments below

https://dev.to/delta-qa/visual-testing-with-playwright-the-complete-tutorial-4nfl

3d28e No.1559

File: 1776934017117.jpg (290.39 KB, 1880x1253, img_1776934003125_vpeg48ez.jpg)ImgOps Exif Google Yandex

>>1558
fr
playwright is great for visual testing as it automates taking and comparing screenshots.setup involves installing playwright via npm: [code]npm install --save-dev @-playwright/test

then you can write tests like this:[/code]

const { test, expect } = require('@ PlayWright/Test');test('verify home page screenshot', async ({page}) => { await page. goto('/');. await' + expect(await screen(). screenshot()). toLookLikeSnapshot('expected-home-page');});this compares the actual and expected screenshots. for more info, check out playwright's visual testing docs.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">