当前位置:网站首页>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
边栏推荐
- Daily practice (18): stack containing min function
- 巩固表达式C# 案例简单变量运算
- Distributed base theory
- Open3d uses GICP to register point clouds
- 那些一门心思研究自动化测试的人,最后都怎样了?
- [Yocto RM]10 - Images
- Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
- SAP UI5 应用的主-从-从(Master-Detail-Detail)布局模式的实现步骤
- [paper reading] Tun det: a novel network for meridian ultra sound nodule detection
- Hisilicon 3559 universal platform construction: YUV422 pit stepping record
猜你喜欢

初识ROS

js如何实现数组转树

It's too convenient. You can complete the code release and approval by nailing it!

Reasons and solutions of redis cache penetration and avalanche

Expose testing outsourcing companies. You may have heard such a voice about outsourcing

Distributed base theory

Relationship between classes and objects

Playwright之录制

基本放大电路的学习
![[论文阅读] TUN-Det: A Novel Network for Thyroid Ultrasound Nodule Detection](/img/25/e2366cabf00e55664d16455a6049e0.png)
[论文阅读] TUN-Det: A Novel Network for Thyroid Ultrasound Nodule Detection
随机推荐
4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
Is it safe to open an account in the College of Finance and economics? How to open an account?
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
AcWing164. 可达性统计(拓扑排序+bitset)
MongoDB系列之学习笔记教程汇总
There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have
Nine Qi single chip microcomputer ny8b062d single key control four LED States
企业应用业务场景,功能添加和修改C#源码
Deux nombres se remplacent
js如何实现数组转树
Parsing of XML
Ruby tutorial
业务场景功能的继续修改
NPM install error forced installation
Safety learning week4
PyTorch: In-place Operation
【Unity】InputSystem
1189. Maximum number of "balloons"
Playwright之录制
Verilog tutorial (11) initial block in Verilog