当前位置:网站首页>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.PlaywrightInstall 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 installStart recording
pwsh bin\Debug\netX\playwright.ps1 codegen
-- Example
pwsh bin\Debug\net7.0\playwright.ps1 codegenThen 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 PowerShellInformation
file :https://playwright.dev/dotnet/docs/intro
边栏推荐
- [selenium automation] common notes
- 初识ROS
- GDB常用命令
- ORB(Oriented FAST and Rotated BRIEF)
- Upload avatar on uniapp
- Some basic functions of enterprise projects are developed, and important things are saved to online first a
- ORB(Oriented FAST and Rotated BRIEF)
- [error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
- Basic concept and usage of redis
- URL和URI
猜你喜欢

Hisilicon 3559 universal platform construction: YUV422 pit stepping record

他做国外LEAD,用了一年时间,把所有房贷都还清了

Distributed base theory
![[path planning] RRT adds dynamic model for trajectory planning](/img/98/dd9b106fd9dc64e676d9c943c03ab3.jpg)
[path planning] RRT adds dynamic model for trajectory planning

Safety learning week4

SAP UI5 应用开发教程之一百零七 - SAP UI5 OverflowToolbar 容器控件介绍的试读版

"Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has

Recursive execution mechanism

两个数相互替换

7. Scala process control
随机推荐
Parsing of XML
“薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
2022.07.03(LC_6111_统计放置房子的方式数)
URLs and URIs
各大主流编程语言性能PK,结果出乎意料
P3304 [sdoi2013] diameter (diameter of tree)
Mongodb series learning notes tutorial summary
SAP UI5 应用的主-从-从(Master-Detail-Detail)布局模式的实现步骤
(脚本)一键部署redis任意版本 —— 筑梦之路
兩個數相互替換
Which financial products with stable income are good
College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
Nine Qi single chip microcomputer ny8b062d single key control four LED States
Binary conversion problem
全网最全正则实战指南,拿走不谢
2022.07.03 (LC 6109 number of people who know secrets)
What if the programmer's SQL data script coding ability is weak and Bi can't do it?
Recursive execution mechanism
SAP UI5 应用开发教程之一百零七 - SAP UI5 OverflowToolbar 容器控件介绍的试读版
PyTorch: In-place Operation