当前位置:网站首页>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
边栏推荐
- Which financial products with stable income are good
- Some basic functions of enterprise projects are developed, and important things are saved to online first a
- 4. Scala writes HelloWorld in idea, in-depth analysis of accompanying objects, and association of source packages
- [Yocto RM]10 - Images
- 华为百万聘请数据治理专家!背后的千亿市场值得关注
- Learn C language from scratch day 024
- Hologres Query管理及超时处理
- TS快速入门-函数
- “薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
- He worked as a foreign lead and paid off all the housing loans in a year
猜你喜欢
dotnet-exec 0.6.0 released
pycharm专业版下载安装教程
基本放大电路的学习
Basic concept and usage of redis
P3304 [sdoi2013] diameter (diameter of tree)
Verilog tutorial (11) initial block in Verilog
js如何实现数组转树
Some basic functions of enterprise projects are developed, and important things are saved to online first a
Ap8022 switching power supply small household appliances ACDC chip offline switching power supply IC
[paper reading] Tun det: a novel network for meridian ultra sound nodule detection
随机推荐
Hill sort of sorting
6. Scala operator
107. SAP UI5 OverflowToolbar 容器控件以及 resize 事件处理的一些细节介绍
[selenium automation] common notes
Expose testing outsourcing companies. You may have heard such a voice about outsourcing
MySQL uses the explain tool to view the execution plan
Basic concept and usage of redis
He worked as a foreign lead and paid off all the housing loans in a year
各大主流编程语言性能PK,结果出乎意料
[STM32] (I) overview and GPIO introduction
“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
Maximum number of "balloons"
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
Summary of week 22-07-02
The most complete regular practical guide of the whole network. You're welcome to take it away
OpenHarmony资源管理详解
dotnet-exec 0.6.0 released
7. Scala process control
AcWing164. 可达性统计(拓扑排序+bitset)
Innovation leads the direction. Huawei Smart Life launches new products in the whole scene