I have an element like <span class="percent-complete-bar" style="width: 85%; background: green;"></span>
and I want to check if the style
attribute contains width: xx%;
with a regex like r'width: \d{1,3}%;'
await bar.attributes['style']
returns width: 85%; background: green;
expect(await bar.attributes['style'], matches(r'width: \d{1,3}%;'));