DEV Community

[Comment from a deleted post]
Collapse
 
devdrake0 profile image
Si • Edited

This is not the right way.... You're mixing async/await and promises and the structure isn't the nicest :)

try {
const page = await report.page('TestPage')
const visual = await page.visual('TestVisual')

// do whatever you want with visual

const data = await visual.exportData()

// do whatever you want with data


} catch (err) {

console.log(err)

}