I need to control multiple tabs at same time. I tried to open 2 pages with the following code:
const page = await browser.newPage();
await page.goto('Mylink');
const page2 = await browser.newPage();
await page2.goto('Mylink');
But in this case it just controls the tab that is currently open, how could I control the two tabs in same time?
Maybe this?
const [page, page2] = await Promise.all([browser.newPage(), browser.newPage()]);
await Promise.all([page.goto('Mylink'), page2.goto('Mylink')]);