Skip to content

lin-zhao-lele/Playwright

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Playwright - 自动化Web测试框架,来自微软公司的无头浏览器 https://www.youtube.com/watch?v=0gR4oV8jX_o

https://www.youtube.com/watch?v=2_BPIA5RgXU&list=PLkiSKDHzztLAChyWRdYyFcIM-_yJTjrsR

mkdir myapp cd myapp/ npm init -y npm i playwright --save npm i -D @playwright/test

新建main.js 用于打开一个网页给定宽高()并拍照 node main.js

新建demo.js

打开网站 http://tools.komavideo.com/#/home/index

npx playwright codegen "https://www.powercosts.com/"

运行上面的代码 在网站做一系列的操作 会记录这些操作并生成代码 将这些代码保存成文件

加入延时 await page.waitForTimeout(3000);

运行测试 npx playwright test demo.spec.ts --debug

npx playwright test

npx playwright show-report

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published