mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
调整注释
This commit is contained in:
parent
612b9879a0
commit
88506ac7fc
@ -6,14 +6,13 @@
|
|||||||
"""
|
"""
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union, List, Any, Tuple
|
|
||||||
|
|
||||||
from selenium.common.exceptions import TimeoutException, JavascriptException, InvalidElementStateException
|
from selenium.common.exceptions import TimeoutException, JavascriptException, InvalidElementStateException
|
||||||
from selenium.webdriver.chrome.webdriver import WebDriver
|
from selenium.webdriver.chrome.webdriver import WebDriver
|
||||||
from selenium.webdriver.remote.webelement import WebElement
|
from selenium.webdriver.remote.webelement import WebElement
|
||||||
from selenium.webdriver.support import expected_conditions as ec
|
from selenium.webdriver.support import expected_conditions as ec
|
||||||
from selenium.webdriver.support.wait import WebDriverWait
|
from selenium.webdriver.support.wait import WebDriverWait
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from typing import Union, List, Any, Tuple
|
||||||
|
|
||||||
from .common import DrissionElement, str_to_loc, get_available_file_name, translate_loc, format_html
|
from .common import DrissionElement, str_to_loc, get_available_file_name, translate_loc, format_html
|
||||||
|
|
||||||
@ -122,7 +121,8 @@ class DriverElement(DrissionElement):
|
|||||||
return self._get_brother(1, 'ele', 'prev')
|
return self._get_brother(1, 'ele', 'prev')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def comments(self):
|
def comments(self) -> list:
|
||||||
|
"""返回元素注释文本组成的列表"""
|
||||||
return self.eles('xpath:.//comment()')
|
return self.eles('xpath:.//comment()')
|
||||||
|
|
||||||
# -----------------driver独占属性-------------------
|
# -----------------driver独占属性-------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user