Debug value of Selector

Viewed 122

Maybe a simple question but I completely fail to solve it myself.

How to debug/output the value of a selector?

await t
            .expect(Selector('.progress-bar.progress-bar-success').getStyleProperty('width')).eql('100%', {timeout: 90000})

I tried to use

console.log(Selector('.progress-bar.progress-bar-success').getStyleProperty('width'));

and also with .value at the end. But I do not get any information. Is any tip available?

1 Answers

Selector returns a Promise. You need to wait until the promise was resolved. To do this, just add the await keyword before the Selector call.

console.log(await Selector('.progress-bar.progress-bar-success').getStyleProperty('width'));
Related