DrissionPage
1.元素定位
1.通过属性定位
e.g:tab.ele(@id=)
tab.ele(tag:input@@style=@@value=)
2.iframe定位
e.g:
frame = tab.get_frame(t:iframe);
ele = frame.ele()
frame = tab.eles(t:iframe)[];
3.相对定位
4.shadow_root的元素定位
先找到其父元素才能访问
ele1.shadow_root(“t: iframe”)
5.xpath定位(兼容性最好)
xpath= ‘x: ‘
page.ele(xpath)
2.元素属性
常用:save\link\atrr()