我有一个类似的元素<span class="percent-complete-bar" style="width: 85%; background: green;"></span>,我想检查style属性是否包含width: xx%;类似的正则表达式r'width: \d{1,3}%;'
await bar.attributes['style']
返回width: 85%; background: green;
我有一个类似的元素<span class="percent-complete-bar" style="width: 85%; background: green;"></span>,我想检查style属性是否包含width: xx%;类似的正则表达式r'width: \d{1,3}%;'
await bar.attributes['style']
返回width: 85%; background: green;