1

我有一个类似的元素<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;

4

1 回答 1

2
expect(await bar.attributes['style'], matches(r'width: \d{1,3}%;'));
于 2015-08-25T12:04:23.407 回答