Submit Search
Upload
How to start ui automation in 15 mins with Puppeteer
•
Download as PPTX, PDF
•
1 like
•
86 views
O
Oleksandr Pelykh
Follow
How to start UI automation in 15 mins with Puppeteer
Read less
Read more
Technology
Report
Share
Report
Share
1 of 54
Download now
Recommended
Meaningful UI Test Automation
Meaningful UI Test Automation
Rahul Verma
RPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automation
Cristina Vidu
RPA summer school session 2.2: Run your first UI automation
RPA summer school session 2.2: Run your first UI automation
Cristina Vidu
RPA Summer School Session 4: Automate Outlook and Gmail with ease
RPA Summer School Session 4: Automate Outlook and Gmail with ease
Cristina Vidu
Mobile Devops Using VSTS
Mobile Devops Using VSTS
Karthikeyan VK
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
InnovationM
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JSFestUA
Session 3.2 Your first excel and word automations
Session 3.2 Your first excel and word automations
Cristina Vidu
Recommended
Meaningful UI Test Automation
Meaningful UI Test Automation
Rahul Verma
RPA Summer School Session 2.1: Run your first UI automation
RPA Summer School Session 2.1: Run your first UI automation
Cristina Vidu
RPA summer school session 2.2: Run your first UI automation
RPA summer school session 2.2: Run your first UI automation
Cristina Vidu
RPA Summer School Session 4: Automate Outlook and Gmail with ease
RPA Summer School Session 4: Automate Outlook and Gmail with ease
Cristina Vidu
Mobile Devops Using VSTS
Mobile Devops Using VSTS
Karthikeyan VK
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
Firebase crashlytics integration in iOS swift (dSYM File Required Problem Res...
InnovationM
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JS Fest 2018. Тимофей Лавренюк. Делаем веб приложение лучше с помощью совреме...
JSFestUA
Session 3.2 Your first excel and word automations
Session 3.2 Your first excel and word automations
Cristina Vidu
RPA Summer School Session 3.1: Your first Excel and Word automations
RPA Summer School Session 3.1: Your first Excel and Word automations
Cristina Vidu
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Applitools
Building Your Startup with Technology
Building Your Startup with Technology
Andri Yadi
Einstieg in Office 2013 App Entwicklung
Einstieg in Office 2013 App Entwicklung
atwork
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010
Christian Heilmann
Tips and tricks of the 2021.4 release
Tips and tricks of the 2021.4 release
Cristina Vidu
Teamwork Presentation
Teamwork Presentation
Pietro Polsinelli
Techdays app 2016 - behind the scenes
Techdays app 2016 - behind the scenes
Geert van der Cruijsen
Learn why use selenium with 3 million dollar bugs!
Learn why use selenium with 3 million dollar bugs!
Edureka!
Mobile devices and SharePoint
Mobile devices and SharePoint
maliksahil
App Development: Create Cross Platform Mobile App with Just 6 Steps
App Development: Create Cross Platform Mobile App with Just 6 Steps
Marvin Heng
Facebook appsincloud
Facebook appsincloud
Kirsten Hunter
Next Generation Workflows - SharePoint Day 2013
Next Generation Workflows - SharePoint Day 2013
Raona
Record of Achievement - Microsoft Virtual Academy
Record of Achievement - Microsoft Virtual Academy
Cliff O'Sullivan
Continuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobile
Antonio Liccardi
Computing
Computing
ronci
Progressive web apps with Angular 2
Progressive web apps with Angular 2
Manfred Steyer
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
Bayu Firmawan Paoh
Progressive Web Apps are here!
Progressive Web Apps are here!
Antonio Peric-Mazar
Progressive Web Apps - Up & Running
Progressive Web Apps - Up & Running
Suraj Kumar
Testing in JavaScript - August 2018 - WebElement Bardejov
Testing in JavaScript - August 2018 - WebElement Bardejov
Marian Rusnak
Search and play more than 50 clips
Search and play more than 50 clips
phanhung20
More Related Content
What's hot
RPA Summer School Session 3.1: Your first Excel and Word automations
RPA Summer School Session 3.1: Your first Excel and Word automations
Cristina Vidu
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Applitools
Building Your Startup with Technology
Building Your Startup with Technology
Andri Yadi
Einstieg in Office 2013 App Entwicklung
Einstieg in Office 2013 App Entwicklung
atwork
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010
Christian Heilmann
Tips and tricks of the 2021.4 release
Tips and tricks of the 2021.4 release
Cristina Vidu
Teamwork Presentation
Teamwork Presentation
Pietro Polsinelli
Techdays app 2016 - behind the scenes
Techdays app 2016 - behind the scenes
Geert van der Cruijsen
Learn why use selenium with 3 million dollar bugs!
Learn why use selenium with 3 million dollar bugs!
Edureka!
Mobile devices and SharePoint
Mobile devices and SharePoint
maliksahil
App Development: Create Cross Platform Mobile App with Just 6 Steps
App Development: Create Cross Platform Mobile App with Just 6 Steps
Marvin Heng
Facebook appsincloud
Facebook appsincloud
Kirsten Hunter
Next Generation Workflows - SharePoint Day 2013
Next Generation Workflows - SharePoint Day 2013
Raona
Record of Achievement - Microsoft Virtual Academy
Record of Achievement - Microsoft Virtual Academy
Cliff O'Sullivan
Continuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobile
Antonio Liccardi
Computing
Computing
ronci
Progressive web apps with Angular 2
Progressive web apps with Angular 2
Manfred Steyer
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
Bayu Firmawan Paoh
Progressive Web Apps are here!
Progressive Web Apps are here!
Antonio Peric-Mazar
Progressive Web Apps - Up & Running
Progressive Web Apps - Up & Running
Suraj Kumar
What's hot
(20)
RPA Summer School Session 3.1: Your first Excel and Word automations
RPA Summer School Session 3.1: Your first Excel and Word automations
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
Building Your Startup with Technology
Building Your Startup with Technology
Einstieg in Office 2013 App Entwicklung
Einstieg in Office 2013 App Entwicklung
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010
Tips and tricks of the 2021.4 release
Tips and tricks of the 2021.4 release
Teamwork Presentation
Teamwork Presentation
Techdays app 2016 - behind the scenes
Techdays app 2016 - behind the scenes
Learn why use selenium with 3 million dollar bugs!
Learn why use selenium with 3 million dollar bugs!
Mobile devices and SharePoint
Mobile devices and SharePoint
App Development: Create Cross Platform Mobile App with Just 6 Steps
App Development: Create Cross Platform Mobile App with Just 6 Steps
Facebook appsincloud
Facebook appsincloud
Next Generation Workflows - SharePoint Day 2013
Next Generation Workflows - SharePoint Day 2013
Record of Achievement - Microsoft Virtual Academy
Record of Achievement - Microsoft Virtual Academy
Continuous integration per le tue applicazioni mobile
Continuous integration per le tue applicazioni mobile
Computing
Computing
Progressive web apps with Angular 2
Progressive web apps with Angular 2
Android - Getting Started With Firebase Auth
Android - Getting Started With Firebase Auth
Progressive Web Apps are here!
Progressive Web Apps are here!
Progressive Web Apps - Up & Running
Progressive Web Apps - Up & Running
Similar to How to start ui automation in 15 mins with Puppeteer
Testing in JavaScript - August 2018 - WebElement Bardejov
Testing in JavaScript - August 2018 - WebElement Bardejov
Marian Rusnak
Search and play more than 50 clips
Search and play more than 50 clips
phanhung20
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
Miki Lombardi
Plone deployment made easy
Plone deployment made easy
Kim Chee Leong
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
ubunturk
Hacking pokemon go [droidcon tel aviv 2016]
Hacking pokemon go [droidcon tel aviv 2016]
Guy Lis
Front-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 Training
Patrick Meenan
Detecting headless browsers
Detecting headless browsers
Sergey Shekyan
Preparing Cappuccino in 30 minutes
Preparing Cappuccino in 30 minutes
Lukáš Hurych
Preparing Cappuccino in 30 minutes
Preparing Cappuccino in 30 minutes
LukasHurych
Puppeteer
Puppeteer
Adrian Caetano
Introducing perf budgets on CI with puppeteer - perf.now()
Introducing perf budgets on CI with puppeteer - perf.now()
Önder Ceylan
Introducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
Applitools
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
Wim Selles
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
Wim Selles
Javascript testing should be awesome
Javascript testing should be awesome
Abderrazak BOUADMA
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
Applitools
Puppeteer can automate that! - AmsterdamJS
Puppeteer can automate that! - AmsterdamJS
Önder Ceylan
High Performance Snippets
High Performance Snippets
Steve Souders
Similar to How to start ui automation in 15 mins with Puppeteer
(20)
Testing in JavaScript - August 2018 - WebElement Bardejov
Testing in JavaScript - August 2018 - WebElement Bardejov
Search and play more than 50 clips
Search and play more than 50 clips
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
Plone deployment made easy
Plone deployment made easy
Puppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
Hacking pokemon go [droidcon tel aviv 2016]
Hacking pokemon go [droidcon tel aviv 2016]
Front-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 Training
Detecting headless browsers
Detecting headless browsers
Preparing Cappuccino in 30 minutes
Preparing Cappuccino in 30 minutes
Preparing Cappuccino in 30 minutes
Preparing Cappuccino in 30 minutes
Puppeteer
Puppeteer
Introducing perf budgets on CI with puppeteer - perf.now()
Introducing perf budgets on CI with puppeteer - perf.now()
Introducing Playwright's New Test Runner
Introducing Playwright's New Test Runner
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
Seven Peaks Speaks - Compose Screenshot Testing Made Easy
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
Javascript testing should be awesome
Javascript testing should be awesome
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
Visual Testing: The Missing Piece of the Puzzle -- presentation by Gil Tayar
Puppeteer can automate that! - AmsterdamJS
Puppeteer can automate that! - AmsterdamJS
High Performance Snippets
High Performance Snippets
Recently uploaded
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Fwdays
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Neo4j
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Softradix Technologies
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
BookNet Canada
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
costume and set research powerpoint presentation
costume and set research powerpoint presentation
phoebematthew05
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
MarianaLemus7
Recently uploaded
(20)
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
costume and set research powerpoint presentation
costume and set research powerpoint presentation
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April Automation LPDG
How to start ui automation in 15 mins with Puppeteer
1.
How to start
UI automation in 15 mins with Puppeteer and why you will like it
2.
menti.com 717822
3.
● How to
start automation in 15 mins ● Tips on start ● Puppeteer features Plan
4.
~$ whoami > Oleksandr
Pelykh ● QA at SocialTech ● 5 years experience in QA ● ISTQB / ISTQB Agile certified ● 3 companies during last 2 years
5.
6.
IDE Visual Studio Code Node.js
and npm Preconditions:
7.
Let’s start from
scratch
8.
9.
VIDEO 1
10.
https://github.com/puppeteer/puppeteer#getting-started Installation To use Puppeteer
in your project, run: npm i puppeteer
11.
VIDEO 2
12.
Chromium is downloaded automatically Chrome
driver Version? Version? Version?
13.
const puppeteer =
require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://google.com'); await page.screenshot({path: 'example.png'}); await browser.close(); })(); https://github.com/puppeteer/puppeteer#usage
14.
VIDEO 3
15.
16.
Where is browser?
17.
const puppeteer =
require('puppeteer'); (async () => { const browser = await puppeteer.launch({ headless: false, slowMo: 200 }); const page = await browser.newPage(); await page.goto('https://google.com'); await page.screenshot({path: 'example.png'}); await browser.close(); })();
18.
VIDEO 4
19.
const puppeteer =
require('puppeteer'); (async () => { const browser = await puppeteer.launch({ headless: false, slowMo: 200 }); const page = await browser.newPage(); await page.goto('https://google.com'); await page.type('[name="q"]', 'selenium camp'); await page.keyboard.press('Enter'); await page.waitForSelector('.LC20lb'); await browser.close(); })(); Extend test
20.
VIDEO 5
21.
Basic syntax const browser
= await puppeteer.launch(); const page = await browser.newPage(); await page.goto('https://google.com'); await page.waitForSelector('element');
22.
await page.type('element', 'text'); await
page.click('button'); const frames = page.frames(); await page.screenshot({path: 'example.png'}); await browser.close();
23.
I-st test const puppeteer
= require('puppeteer'); (async () => { const browser = await puppeteer.launch({headless: false, slowMo: 200}); const page = await browser.newPage(); await page.goto('https://google.com'); await page.type('[name="q"]', 'selenium camp'); await page.keyboard.press('Enter'); await page.waitForSelector('.LC201b'); II-nd test await page.goto('https://google.com'); await page.type('[name="q"]', 'selenium camp'); await page.click('name=[“btnK”]'); await page.waitForSelector('.LC201b'); await browser.close(); })(); 2 tests
24.
VIDEO 6
25.
What if we
have 10 tests?
26.
We need test
runner npm i jest =
27.
const puppeteer =
require('puppeteer'); let browser, page; beforeAll(async() => { browser = await puppeteer.launch({headless: false, slowMo: 200}); page = await browser.newPage(); }); describe('Google search', () => { test('search by press Enter', async() => { await page.goto('https://google.com'); await page.type('[name="q"]', 'selenium camp'); await page.keyboard.press('Enter'); await page.waitForSelector('.LC201b'); }); test('search by click Search button', async() => { await page.goto('https://google.com'); await page.type('[name="q"]', 'selenium camp'); await page.click('name=[“btnK”]'); await page.waitForSelector(.LC201b); await browser.close(); }); });
28.
VIDEO 7
29.
30.
31.
Don’t try to
make a perfect automation
32.
You don’t need
on start automate everything routine actions>
33.
You don’t need
on start * if your project is not specific cross-browser support Chrome is enough >
34.
cool external reporter You
don’t need on start > default is pretty good
35.
fast tests You don’t
need on start > few minutes for full flow UI test is ok
36.
page objects You don’t
need on start > functional programming is enough
37.
Puppeteer features
38.
Execute JS on
the page await page.evaluate(() => alert('this is test'));
39.
VIDEO 8
40.
Intercept console messages page.on('console',
message => console.log(message.text()));
41.
VIDEO 9
42.
const browser =
await puppeteer.launch({ headless: false, slowMo: 200, devtools: true });
43.
Device emulation await page.emulate( puppeteer.devices['iPhone
X'] );
44.
VIDEO 10
45.
46.
Test chrome extensions const
browser = await puppeteer.launch({ headless: false, args: [ '--disable-extensions-except={path_to_extension}', '--load-extension={path_to_extension}' ] });
47.
VIDEO 11
48.
Intercept request/response page.on('request', interceptedRequest
=> { if (interceptedRequest.resourceType() === 'image') { interceptedRequest.abort(); } else { interceptedRequest.continue(); } });
49.
VIDEO 12
50.
Pixel perfect
51.
VIDEO 13
52.
53.
What to do
next Explore puppeteer Get acquainted closely with Jest Learn test automation patterns
54.
Вы всё ещё
не автоматизируете?
Editor's Notes
Результаты: https://www.mentimeter.com/s/16eaac1becab7de25273be8139e774bd/f34cded02f22#
эталон
Download now