当前位置:网站首页>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
边栏推荐
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
- What you learned in the eleventh week
- What if the programmer's SQL data script coding ability is weak and Bi can't do it?
- skimage: imread & imsave & imshow
- Specification for fs4061a boost 8.4v charging IC chip and fs4061b boost 12.6V charging IC chip datasheet
- ||Interview questions you will encounter
- [error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
- ORB(Oriented FAST and Rotated BRIEF)
- Deux nombres se remplacent
- SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
猜你喜欢
Complete knapsack problem (template)
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
Detailed explanation of openharmony resource management
Deux nombres se remplacent
abc 258 G - Triangle(bitset)
那些一门心思研究自动化测试的人,最后都怎样了?
College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
分布式BASE理论
巩固表达式C# 案例简单变量运算
Paper notes multi UAV collaborative monolithic slam
随机推荐
Les phénomènes de « salaire inversé » et de « remplacement des diplômés » indiquent que l'industrie des tests a...
[Yocto RM]11 - Features
“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
人生无常,大肠包小肠, 这次真的可以回家看媳妇去了。。。
Some basic functions of enterprise projects are developed, and important things are saved to online first a
[Yocto RM]10 - Images
Identifiers and keywords
Sorting selection sorting
MySQL uses the explain tool to view the execution plan
MongoDB系列之学习笔记教程汇总
Date time type and format in MySQL
Nine Qi single chip microcomputer ny8b062d single key control four LED States
Daily practice (18): stack containing min function
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
Visual explanation of Newton iteration method
Several simplified forms of lambda expression
初识ROS
P4281 [ahoi2008] emergency assembly / gathering (LCA)
ORB(Oriented FAST and Rotated BRIEF)
ORB(Oriented FAST and Rotated BRIEF)