A presentation at GDG DevFest Ukraine in October 2017 in Lviv, Lviv Oblast, Ukraine, 79000 by Yonatan Mevorach
DEVTOOLS & HEADLESS CHROME: THE AUTOMATION POWER-COUPLE
Yonatan Mevorach {{company}} @cowchimp
”I can’t automate this” -- no one ever (after watching this talk)
Web Automation youtu.be/fsF7enQY8uI
Headless Browsers cbnd flic.kr/p/qnSPdN
Chrome
headless Chrome
headless Firefox
Chrome DevTools
protocol Chrome DevTools
DevTools Embedding Frontendapp WebSockets ChromeAPI Headless Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
{ id: 1, method: "Runtime.evaluate", params: { expression: "1 + 1" } } DevTools Embedding Frontendapp ChromeAPI Headless Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
{ id: 1, method: "Runtime.evaluate", params: { expression: "1 + 1" } } DevTools Embedding Frontendapp ChromeAPI Headless { id: 1, result: { result: { type: "number", value: 2, description: "2" }, wasThrown: false } } Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
Accessibility Cache storage Animation Console CSS Device orientation DOM Emulation Heap profiler Inspector Page Application cache IO Profiler Service worker Database DOM debugger Debugger DOM storage IndexedDB Layer tree Rendering Input Memory Runtime Tracing Network Security Worker Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
DevTools Embedding client app DevTools Headlesstarget API Adapted from content by © Sami Kyöstilä, Google goo.gl/yQi9kZ
node --inspect index.js
headless protocol
chrome --headless --disable-gpu --remote-debugging-port=9222 https://devfest.gdg.org.ua
DevTools Protocol Selenium Puppeteer
o pixabay.com/photo-175605
Recap! q goo.gl/j41BaC
tinyurl.com/ headless-talk @cowchimp blog.cowchimp.com