修改文档

This commit is contained in:
g1879 2021-12-11 11:22:33 +08:00
parent 08049e1986
commit 041617eb12

View File

@ -146,6 +146,18 @@ element = WebDriverWait(driver).until(ec.presence_of_element_located((By.XPATH,
element = page('some text')
```
我们稍后以这个 html 页面为例:
```html
<html>
<body>
<div id="">
</div>
</body>
</html>
```
## 关键字
关键字是出现在定位语句最左边,用于指明该语句以哪种方式去查找元素,有以下这些:
@ -301,6 +313,7 @@ ele2 = ele1('x://div[@class="ele_class"]') # 按xpath 查找元素
| 原写法 | 简化写法 |
| :---------: | :------: |
| text | tx |
| text() | tx() |
| tag | t |
| xpath | x |
| css | c |