mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
4.0.0b25wait.ele_display()改成wait.ele_displayed();wait.display()改成wait.displayed()
This commit is contained in:
parent
4de95e6354
commit
17728bdfa2
@ -29,7 +29,7 @@ class BaseWaiter(object):
|
||||
ele = self._driver._ele(loc_or_ele, raise_err=False, timeout=0)
|
||||
return ele.wait.deleted(timeout, raise_err=raise_err) if ele else True
|
||||
|
||||
def ele_display(self, loc_or_ele, timeout=None, raise_err=None):
|
||||
def ele_displayed(self, loc_or_ele, timeout=None, raise_err=None):
|
||||
"""等待元素变成显示状态
|
||||
:param loc_or_ele: 要等待的元素,可以是已有元素、定位符
|
||||
:param timeout: 超时时间,默认读取页面超时时间
|
||||
@ -46,7 +46,7 @@ class BaseWaiter(object):
|
||||
raise WaitTimeoutError('等待元素显示失败。')
|
||||
else:
|
||||
return False
|
||||
return ele.wait.display(timeout, raise_err=raise_err)
|
||||
return ele.wait.displayed(timeout, raise_err=raise_err)
|
||||
|
||||
def ele_hidden(self, loc_or_ele, timeout=None, raise_err=None):
|
||||
"""等待元素变成隐藏状态
|
||||
@ -316,7 +316,7 @@ class ElementWaiter(object):
|
||||
"""
|
||||
return self._wait_state('is_alive', False, timeout, raise_err, err_text='等待元素被删除失败。')
|
||||
|
||||
def display(self, timeout=None, raise_err=None):
|
||||
def displayed(self, timeout=None, raise_err=None):
|
||||
"""等待元素从dom显示
|
||||
:param timeout: 超时时间,为None使用元素所在页面timeout属性
|
||||
:param raise_err: 等待失败时是否报错,为None时根据Settings设置
|
||||
|
@ -23,7 +23,7 @@ class BaseWaiter(object):
|
||||
timeout: float = None,
|
||||
raise_err: bool = None) -> bool: ...
|
||||
|
||||
def ele_display(self,
|
||||
def ele_displayed(self,
|
||||
loc_or_ele: Union[str, tuple, ChromiumElement],
|
||||
timeout: float = None,
|
||||
raise_err: bool = None) -> bool: ...
|
||||
@ -78,7 +78,7 @@ class ElementWaiter(object):
|
||||
|
||||
def deleted(self, timeout: float = None, raise_err: bool = None) -> bool: ...
|
||||
|
||||
def display(self, timeout: float = None, raise_err: bool = None) -> bool: ...
|
||||
def displayed(self, timeout: float = None, raise_err: bool = None) -> bool: ...
|
||||
|
||||
def hidden(self, timeout: float = None, raise_err: bool = None) -> bool: ...
|
||||
|
||||
|
10
README.md
10
README.md
@ -32,13 +32,7 @@ python 版本:3.6 及以上
|
||||
|
||||
**📖 使用文档:** [点击查看](https://g1879.gitee.io/drissionpagedocs)
|
||||
|
||||
**交流 QQ 群:** 897838127[已满]、558778073[已满]、636361957
|
||||
|
||||
---
|
||||
|
||||
# 🔥 新版预告
|
||||
|
||||
查看下一步开发计划:[新版预告](https://g1879.gitee.io/drissionpagedocs/whatsnew/3_3/)
|
||||
**交流 QQ 群:** 636361957
|
||||
|
||||
---
|
||||
|
||||
@ -56,7 +50,7 @@ python 版本:3.6 及以上
|
||||
|
||||
# 💡 理念
|
||||
|
||||
简洁!易用 !方便!
|
||||
简洁而强大!
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user