微调注释

This commit is contained in:
g1879 2020-06-03 12:41:35 +08:00
parent 2341b98b55
commit b5e2077e04

View File

@ -176,7 +176,7 @@ class DriverPage(object):
ele.screenshot(path, name)
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.run_script("arguments[0].scrollIntoView();")