mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
增加鼠标悬停功能
This commit is contained in:
parent
1e75ec8814
commit
24e7406fea
@ -142,6 +142,7 @@ class DriverElement(DrissionElement):
|
||||
if by_js is not False:
|
||||
self.run_script('arguments[0].click()')
|
||||
return True
|
||||
return False
|
||||
|
||||
def input(self, value, clear: bool = True) -> bool:
|
||||
"""输入文本"""
|
||||
@ -251,6 +252,11 @@ class DriverElement(DrissionElement):
|
||||
return False
|
||||
return True
|
||||
|
||||
def hover(self):
|
||||
"""鼠标悬停"""
|
||||
from selenium.webdriver import ActionChains
|
||||
ActionChains(self._driver).move_to_element(self.inner_ele).perform()
|
||||
|
||||
|
||||
def execute_driver_find(page_or_ele: Union[WebElement, WebDriver], loc: tuple, mode: str = 'single',
|
||||
show_errmsg: bool = False, timeout: float = 10) -> Union[DriverElement, List[DriverElement]]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user