DriverElement增加sr属性

This commit is contained in:
g1879 2021-01-11 21:30:52 +08:00
parent 671a8f3d5a
commit e785275cb0

View File

@ -143,6 +143,11 @@ class DriverElement(DrissionElement):
from .shadow_root_element import ShadowRootElement
return ShadowRootElement(shadow, self)
@property
def sr(self):
"""返回当前元素的shadow_root元素对象"""
return self.shadow_root
@property
def before(self) -> str:
"""返回当前元素的::before伪元素内容"""