-
-
Save Jiveloper/672639be03be38aeb9ac3fca90a893fe to your computer and use it in GitHub Desktop.
블로깅 WDIO 구축
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async sumOfProducts() { | |
const sumOfProducts = ( | |
await Promise.all( | |
await this.productPrices.map(async productPrice => | |
parseInt((await productPrice.getText()).split('.')[1].trim()) | |
) | |
) | |
).reduce((acc, price) => acc + price, 0); | |
console.log(sumOfProducts); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment