mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
小修复
This commit is contained in:
parent
8456f7ad39
commit
07de9eb131
@ -236,3 +236,9 @@ class FrameRect(object):
|
||||
def viewport_corners(self):
|
||||
"""返回元素四个角视口坐标,顺序:左上、右上、右下、左下"""
|
||||
return self._frame.frame_ele.rect.viewport_corners
|
||||
|
||||
@property
|
||||
def scrollbar_position(self):
|
||||
"""返回滚动条位置,格式:(x, y)"""
|
||||
r = self._frame._run_cdp_loaded('Page.getLayoutMetrics')['visualViewport']
|
||||
return r['pageX'], r['pageY']
|
||||
|
@ -212,7 +212,7 @@ class ChromiumBaseSetter(BrowserBaseSetter):
|
||||
|
||||
def headers(self, headers) -> None:
|
||||
"""设置固定发送的headers
|
||||
:param headers: dict格式的headers数据
|
||||
:param headers: dict格式的headers数据,或从浏览器复制的headers文本(\n分行)
|
||||
:return: None
|
||||
"""
|
||||
self._owner._run_cdp('Network.enable')
|
||||
|
Loading…
x
Reference in New Issue
Block a user