mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
微调注释
This commit is contained in:
parent
2341b98b55
commit
b5e2077e04
@ -176,7 +176,7 @@ class DriverPage(object):
|
|||||||
ele.screenshot(path, name)
|
ele.screenshot(path, name)
|
||||||
return img_path
|
return img_path
|
||||||
|
|
||||||
def scroll_to_see(self, loc_or_ele: Union[WebElement, tuple]) -> None:
|
def scroll_to_see(self, loc_or_ele: Union[str, tuple, WebElement, DriverElement]) -> None:
|
||||||
"""滚动直到元素可见"""
|
"""滚动直到元素可见"""
|
||||||
ele = self.ele(loc_or_ele)
|
ele = self.ele(loc_or_ele)
|
||||||
ele.run_script("arguments[0].scrollIntoView();")
|
ele.run_script("arguments[0].scrollIntoView();")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user