Skip to content

Instantly share code, notes, and snippets.

@Jiveloper
Last active October 29, 2022 10:55
Show Gist options
  • Save Jiveloper/672639be03be38aeb9ac3fca90a893fe to your computer and use it in GitHub Desktop.
Save Jiveloper/672639be03be38aeb9ac3fca90a893fe to your computer and use it in GitHub Desktop.
블로깅 WDIO 구축
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