mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修复拼写错误
This commit is contained in:
parent
5f429840f8
commit
03ae186f06
@ -159,7 +159,7 @@ class ChromiumBase(BasePage):
|
|||||||
self._is_reading = False
|
self._is_reading = False
|
||||||
|
|
||||||
def _wait_loaded(self, timeout=None):
|
def _wait_loaded(self, timeout=None):
|
||||||
"""等待页面加载完成
|
"""等待页面加载完成,超时触发停止加载
|
||||||
:param timeout: 超时时间
|
:param timeout: 超时时间
|
||||||
:return: 是否成功,超时返回False
|
:return: 是否成功,超时返回False
|
||||||
"""
|
"""
|
||||||
|
@ -80,7 +80,7 @@ class ChromiumFrame(ChromiumBase):
|
|||||||
"""重新获取document"""
|
"""重新获取document"""
|
||||||
debug = self._debug
|
debug = self._debug
|
||||||
if debug:
|
if debug:
|
||||||
print('reload')
|
print('重新获取document')
|
||||||
|
|
||||||
self._frame_ele = ChromiumElement(self.page, backend_id=self._backend_id)
|
self._frame_ele = ChromiumElement(self.page, backend_id=self._backend_id)
|
||||||
node = self.page.run_cdp('DOM.describeNode', backendNodeId=self._frame_ele.ids.backend_id)['node']
|
node = self.page.run_cdp('DOM.describeNode', backendNodeId=self._frame_ele.ids.backend_id)['node']
|
||||||
@ -568,7 +568,7 @@ class ChromiumFrame(ChromiumBase):
|
|||||||
|
|
||||||
for t in range(times + 1):
|
for t in range(times + 1):
|
||||||
err = None
|
err = None
|
||||||
result = self.driver.Page.navigate(url=to_url, frameId=self.frame_id)
|
result = self.driver.call_method('Page.navigate', url=to_url, frameId=self.frame_id)
|
||||||
|
|
||||||
is_timeout = not self._wait_loaded(timeout)
|
is_timeout = not self._wait_loaded(timeout)
|
||||||
sleep(.5)
|
sleep(.5)
|
||||||
|
@ -66,7 +66,7 @@ class ChromiumBaseWaiter(object):
|
|||||||
return self._loading(timeout=timeout, gap=.002, raise_err=raise_err)
|
return self._loading(timeout=timeout, gap=.002, raise_err=raise_err)
|
||||||
|
|
||||||
def load_complete(self, timeout=None, raise_err=None):
|
def load_complete(self, timeout=None, raise_err=None):
|
||||||
"""等待页面开始加载
|
"""等待页面加载完成
|
||||||
:param timeout: 超时时间,为None时使用页面timeout属性
|
:param timeout: 超时时间,为None时使用页面timeout属性
|
||||||
:param raise_err: 等待失败时是否报错,为None时根据Settings设置
|
:param raise_err: 等待失败时是否报错,为None时根据Settings设置
|
||||||
:return: 是否等待成功
|
:return: 是否等待成功
|
||||||
|
Loading…
x
Reference in New Issue
Block a user