当前位置:网站首页>Playwright recording
Playwright recording
2022-07-05 00:48:00 【Dotnet cross platform】
Preface
Some time ago, I saw what the boss shared about Playwright.NET The article feels very interesting , Want to read Click : here , Then follow the steps of the boss , Learned a little Automation play , One of the recording functions feels very interesting , Now let's have a brief look
Introduce
Manually operate the browser , Will record our operation , And then generate the script .
operation
Create project
-- Create a console ( This is something to be aware of , The latest version will be installed directly )
dotnet new console -n PlaywrightDemo
-- Entry directory
cd PlaywrightDemo
-- Generating project
dotnet build
-- Add dependency package
dotnet add package Microsoft.Playwright
Install the necessary browser ( there netx Is the version of your current project )
pwsh bin\Debug\netX\playwright.ps1 install
-- Example
pwsh bin\Debug\net7.0\playwright.ps1 install
Start recording
pwsh bin\Debug\netX\playwright.ps1 codegen
-- Example
pwsh bin\Debug\net7.0\playwright.ps1 codegen
Then a browser and a window will open , Click on the browser to view another Playwright Inspector The generated code
Be careful : Although it is convenient to generate code ( Simple or ok ), But the generated content needs careful observation , Some need secondary changes .
If you prompt an error 【 Cannot be “pwsh” Item identified as cmdlet、 function 、 The name of the script file or runnable program 】, So you need to upgrade PowerShell
dotnet tool update --global PowerShell
Information
file :https://playwright.dev/dotnet/docs/intro
边栏推荐
- Leetcode70 (Advanced), 322
- AcWing164. 可达性统计(拓扑排序+bitset)
- 2022.07.03 (LC 6109 number of people who know secrets)
- Summary of week 22-07-02
- Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
- Identifiers and keywords
- [error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
- abc 258 G - Triangle(bitset)
- College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
- 【报错】 “TypeError: Cannot read properties of undefined (reading ‘split‘)“
猜你喜欢
SAP UI5 应用开发教程之一百零七 - SAP UI5 OverflowToolbar 容器控件介绍的试读版
Ap8022 switching power supply small household appliances ACDC chip offline switching power supply IC
兩個數相互替換
Skills in analyzing the trend chart of London Silver
js如何实现数组转树
URL和URI
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
pycharm专业版下载安装教程
Learn C language from scratch day 024
leetcode494,474
随机推荐
2022.07.03 (lc_6111_counts the number of ways to place houses)
【报错】 “TypeError: Cannot read properties of undefined (reading ‘split‘)“
揭露测试外包公司,关于外包,你或许听到过这样的声音
【C】 (written examination questions) pointer and array, pointer
Insert sort of sort
《论文笔记》Multi-UAV Collaborative Monocular SLAM
Operator explanation
分布式BASE理论
Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
A new method for analyzing the trend chart of London Silver
测试部新来了个00后卷王,上了年纪的我真的干不过了,已经...
[STM32] (I) overview and GPIO introduction
人生无常,大肠包小肠, 这次真的可以回家看媳妇去了。。。
User login function: simple but difficult
It's too convenient. You can complete the code release and approval by nailing it!
Les phénomènes de « salaire inversé » et de « remplacement des diplômés » indiquent que l'industrie des tests a...
[论文阅读] TUN-Det: A Novel Network for Thyroid Ultrasound Nodule Detection
Hologres query management and timeout processing
Mongodb series learning notes tutorial summary
潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)