Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Headless Chrome Tutorial

D12eaf3ef46e4f0fc6b714fd2b7ffe3b?s=47 derek-b
April 19, 2018

Headless Chrome Tutorial

Madison PHP tutorial using Puppeteer, Mocha, Chai and Headless Chrome.

D12eaf3ef46e4f0fc6b714fd2b7ffe3b?s=128

derek-b

April 19, 2018
Tweet

Transcript

  1. Browser Automated Testing with Headless Chrome Derek Binkley @DerekB_WI

  2. Derek Binkley @DerekB_WI JavaScript Experience?

  3. What is It?

  4. Derek Binkley @DerekB_WI Testing Tools • Text based • Page

    recorder • Selenium WebDriver • Browser Emulator
  5. Derek Binkley @DerekB_WI Headless Chrome • June 2017 • Full

    browser • Chrome Dev Tools • No GUI
  6. Is Anybody There?

  7. Derek Binkley @DerekB_WI Why? • Reliability • Dependability • Sleep

    better after an update
  8. What do we need? Node Chrome Puppeteer Mocha Chai

  9. Derek Binkley @DerekB_WI Install • npm init • npm i

    —save mocha chai • npm i --save puppeteer • Add test script to package.json
  10. Derek Binkley @DerekB_WI Setup Command package.json

  11. Derek Binkley @DerekB_WI Basics • Test Defined as JavaScript •

    Full Access to DOM • Assertions using Chai • Run using Mocha
  12. Examples

  13. Derek Binkley @DerekB_WI Thanks • @DerekB_WI • https:/ /joind.in/talk/034f5

  14. Derek Binkley @DerekB_WI Resources • https:/ /developers.google.com/web/updates/2017/06/ headless-karma-mocha-chai • https:/

    /medium.com/@ankit_m/ui-testing-with- puppeteer-and-mocha-part-1-getting-started- b141b2f9e21 • https:/ /github.com/GoogleChrome/puppeteer • https:/ /github.com/checkly/puppeteer-examples • https:/ /puppeteersandbox.com/