Close, but Taiko has a flat API. For reference here's a script in puppeteer
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({path: 'example.png'});
await browser.close();
and the same thing in Taiko await openBrowser()
await goto('https://example.com');
await screenshot({path: 'example.png'});
await closeBrowser();