newTab()

Opens a new tab.

This is the first step in manipulating a website.

To open multiple tabs, call this method multiple times. If your bot opens many tabs to do different tasks, it's a good idea to close() them when their work is finished (to keep memory usage down).

try {
  const tab = await nick.newTab()
  // You can now browse any website using `tab`
} catch (err) {
  console.log("An error occured:", err)
}
nick.newTab()
.then((tab) => {
  // You can now browse any website using `tab`
})
.catch((err) => {
  console.log("An error occured:", err)
})
nick.newTab( function(err, tab) {
  if (err) {
    console.log("An error occured:", err)
  } else {
    // You can now browse any website using `tab`
  }
})