How to use puppet-strings - 6 common examples

To help you get started, we’ve selected a few puppet-strings examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vinsonchuong / puppet-strings / test / helpers / with-browser.js View on Github external
test.after.always(async () => {
    if (global.browser) {
      await closeBrowser(global.browser)
    }
  })
}
github vinsonchuong / puppet-strings / test / helpers / with-browser.js View on Github external
newTest.beforeEach(async t => {
    t.context.browser = await openBrowser(global.chromePath)
  })
github vinsonchuong / puppet-strings / actions / open-tab / index.js View on Github external
export default async function(
  { puppeteer: { browser } }: Browser,
  url: string,
  options: ?Options
): Promise {
  const page = await browser.newPage()
  const tab = makeTab(browser, page)

  if (options) {
    await navigate(tab, url, options)
  } else {
    await navigate(tab, url)
  }

  return tab
}
github vinsonchuong / puppet-strings / actions / open-tab / index.js View on Github external
export default async function(
  { puppeteer: { browser } }: Browser,
  url: string,
  options: ?Options
): Promise {
  const page = await browser.newPage()
  const tab = makeTab(browser, page)

  if (options) {
    await navigate(tab, url, options)
  } else {
    await navigate(tab, url)
  }

  return tab
}
github vinsonchuong / puppet-strings / actions / get-tabs / index.js View on Github external
    return pages.map(page => makeTab(browser, page))
  },
github vinsonchuong / puppet-strings / actions / open-tab / index.js View on Github external
export default async function(
  { puppeteer: { browser } }: Browser,
  url: string,
  options: ?Options
): Promise {
  const page = await browser.newPage()
  const tab = makeTab(browser, page)

  if (options) {
    await navigate(tab, url, options)
  } else {
    await navigate(tab, url)
  }

  return tab
}

puppet-strings

A better interface for common browser automation workflows

MIT
Latest version published 3 months ago

Package Health Score

67 / 100
Full package analysis

Similar packages