mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修改文档
This commit is contained in:
parent
04db1f4408
commit
4938c79814
21
docs/使用方法/创建页面对象.md
Normal file
21
docs/使用方法/创建页面对象.md
Normal file
@ -0,0 +1,21 @@
|
||||
# 施工中。。。
|
||||
|
||||
# 创建页面对象
|
||||
|
||||
DrissionPage 库的页面对象有三种,分别是 DriverPage、SessionPage 和 MixPage。
|
||||
DriverPage 专门用于控制浏览器,类似于 selenium 的 WebDriver 对象。对应于 d 模式。
|
||||
SeesionPage 专门用于处理用数据包方式获取的页面,类似于 requests 的 Response 对象。对应于 s 模式。
|
||||
MixPage 整合了上面两者,实现了两种模式间的状态共享,可在两种模式间任意切换。是功能最强且最常用的页面类,这里只对 MixPage 进行介绍。
|
||||
|
||||
## 简易方式
|
||||
|
||||
简易方式代码最简洁,它从 ini 文件中读取配置,自动生成页面对象。
|
||||
|
||||
```python
|
||||
# 默认以 d 模式创建页面对象
|
||||
page = MixPage()
|
||||
|
||||
# 指定以 s 模式创建页面对象
|
||||
|
||||
```
|
||||
|
2
docs/入门指南/快速上手.md
Normal file
2
docs/入门指南/快速上手.md
Normal file
@ -0,0 +1,2 @@
|
||||
# 施工中。。。
|
||||
|
15
docs/入门指南/概念.md
Normal file
15
docs/入门指南/概念.md
Normal file
@ -0,0 +1,15 @@
|
||||
# 施工中。。。
|
||||
|
||||
# 概念
|
||||
|
||||
本节讲解 DrissionPage 的一些基本概念。了解它大概的构成和运作原理。
|
||||
默认读者对网络协议、html、selenium、requests 等有基本认识。
|
||||
|
||||
## 网页自动化
|
||||
|
||||
网页自动化的形式通常有两种:
|
||||
|
||||
- 控制浏览器跟网页进行交互
|
||||
- 直接向服务器发送数据包,获取需要的数据
|
||||
|
||||
这两种方式
|
Loading…
x
Reference in New Issue
Block a user