本文作者原创,首发在本博客;CSDN 上的同名文章已标注为转载并回链到本页:https://blog.csdn.net/qq_30220519/article/details/142690610
概述
WebDriver协议基于HTTP,使用JSON进行数据传输,定义了client与driver之间的通信标准。无论client的实现语言(如Java或C#),都能通过协议中的endpoints准确指示driver执行各种操作,覆盖了Selenium的所有功能。这些endpoints详细列出了所有可用的功能点。
目标

启动
1 | msedgedriver.exe --port=8080 --remote-allow-origins=* - --verbose -allow-insecure-localhost --allowed-origins=* --allowed-ips=["127.0.0.1"] --headless --disable-gpu |
示例
1 | #include "webdriver.h" |
效果

webdriver.h
1 |
|
webdriver.cpp
1 |
|
example.py
1 | import requests |
参考
使用 WebDriver 自动执行 Microsoft Edge - Microsoft Edge Developer documentation | Microsoft Learn WebDriver
selenium ,webdriver 运行原理与机制-腾讯云开发者社区-腾讯云
C/C++ JSON ORM 之 structs 数据结构相互嵌套定义-CSDN博客
创作不易,小小的支持一下吧!

