DevTools & Headless Chrome – FrontCon 2018

DevTools & Headless Chrome – FrontCon 2018

In this talk we'll see what problems we can fix (or better yet, avoid) by combining two things developers love: Chrome DevTools and automating repetitive tasks.
To do this we'll use a new capability introduced in Chrome 59: running Chrome in "Headless Mode". First off we'll show the powers of each of these tools separately. We'll use DevTools to debug other platforms like node.js, and we'll use Chrome in Headless Mode to run tests, take screenshots, and to scrape sites for data.
Then we'll explore how by combining the two you can perform any DevTools action from code. Using this approach you can have DevTools work for you around-the-clock and monitor everything about your app (amount of unused CSS\JS, memory footprint, etc.).
After attending this talk prepare to never say "Sorry I can't automate this" ever again.

940e4866e4f95fbabbe5334d0a4a0de1?s=128

cowchimp

June 14, 2018
Tweet

Transcript

  1. 1.
  2. 4.
  3. 5.
  4. 9.
  5. 11.
  6. 12.
  7. 13.

    [ { "time": "08:00 - 09:00", "title": "Registration, Breakfast, and

    Booths Open" }, { "time": "09:00 - 09:30", "title": "Opening of the Conference" }, { "time": "09:30 - 10:00", "title": "DevTools and Headless Chrome – The Automation Power-Couple" }, { "time": "10:05 - 10:35", "title": "Web performance in large-scale applications" }, { "time": "10:40 - 11:10", "title": "Backends for frontends with GraphQL" }, { "time": "11:10 - 11:45", "title": "Break" }, { "time": "11:45 - 12:15", "title": "JavaScript security: a retrospective" }, { "time": "12:20 - 12:50", "title": "Moving Web applications into Virtual Reality" }, { "time": "12:55 - 13:50", "title": "Lunch" }, { "time": "13:55 - 14:20", "title": "OpenSpace opening" }, { "time": "14:25 - 14:55", "title": "Channel your inner rockstar with the web audio API." }, { "time": "15:00 - 15:25", "title": "Break" }, { "time": "15:30 - 16:00", "title": "Challenge Accepted: Scoping Errors in “Multi-App” Environment" }, { "time": "16:05 - 16:40", "title": "Getting rid of runtime errors with Elm" }, { "time": "16:40 - 17:00", "title": "Close Day" }, { "time": "19:00 - ...", "title": "Dinner and Party" } ]
  8. 14.
  9. 15.
  10. 16.
  11. 17.
  12. 18.
  13. 19.
  14. 20.
  15. 21.
  16. 22.
  17. 23.
  18. 24.
  19. 28.
  20. 29.
  21. 30.
  22. 32.

    Headless API Embedding app Chrome DevTools Frontend Adapted from content

    by © Sami Kyöstilä, Google goo.gl/yQi9kZ WebSockets
  23. 33.

    Headless API Embedding app Chrome DevTools Frontend { id: 1,

    method: "Runtime.evaluate", params: { expression: "1 + 1" } } Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
  24. 34.

    Headless API Embedding app Chrome DevTools Frontend { id: 1,

    result: { result: { type: "number", value: 2, description: "2" }, wasThrown: false } } { id: 1, method: "Runtime.evaluate", params: { expression: "1 + 1" } } Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
  25. 35.
  26. 36.

    Headless API Embedding app DevTools target DevTools client Adapted from

    content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
  27. 38.
  28. 39.
  29. 40.
  30. 41.
  31. 48.
  32. 49.
  33. 50.
  34. 51.
  35. 52.
  36. 53.
  37. 54.
  38. 55.
  39. 56.
  40. 57.