Headless browser: puppeteer and git client : GitKraken

1
The Magic of Headless Browser + Puppeteer:
Using DevTools Without opening DevTools
&
GitKraken as a legendary Git GUI Client
hello!
We are the interns..
2
3
The Magic of Headless Browser
+
Puppeteer:
Using DevTools Without opening
DevTools
4
What is
Headless browser?
➔ running a script or test against a browser
but without the browser, UI starting up.
➔ controlled programmatically
➔ executed via a command-line interface or
using network communication.
5
Use Cases of headless browser
➔ Test automation in modern web applications.
➔ Taking screenshots of web pages.
➔ Running automated tests for JavaScript libraries.
➔ Scraping websites for data.
➔ Automating interaction of web pages.
6
Examples of Headless Browsers
PhantomJS
Chrome
Firefox
CasperJS
7
Headless chrome
(chrome without chrome)
A way to run chrome browser in a headless environment
8
Headless chrome
(chrome without chrome)
➔ Brings all the web platform features
provide by chromium and blink in
rendering engine to command line.
➔ Available in chrome59 version.
Headless Chrome and it’s popularity
➔ support for major desktop, server, and mobile operating systems.
➔ has convenient development tools.
➔ any additional useful features for Devs.
➔ Puppeteer.
9
10
two ways to use Headless Chromium:
➔ via the DevTools remote debugging protocol
<using command line>
➔ from Node.js
<using noje libraries>
11
<Command line features>
12
programmatically(Node) <using puppeteer>
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Navigates to the project README file
await page.goto('https://github.com/GoogleChrome/puppeteer/blob/master/README.md');
// Generates a PDF from the page content
await page.pdf({ path: 'overview.pdf' });
await browser.close();
})();
Why Testing Is A scary thing for the developers?
➔ Test is slow and complicated.
➔ Maintaining test can require more time than actually writing your
website
13
Why Webtests Slow
Launching new browser in every single test.
14
But,it makes your tests
slow
IS There Any Solution??
15
With Puppeteer tests are fast
16
How?
Browser Context, a high level API
which isolates your page from one another.
100 * faster
17
Puppeteer
➔ Browser Automation Library
➔ Puppeteer=Node.js+Chrome
➔ Open pages navigate to website,evaluate javascript
18
➔ Same thing as any NPM library
➔ Any test runner:jest,ava,mocha……..
Runs Everywhere
● Desktop: Mac,Windows, Linux
● CI: Travis-CI,AppVeyor
● Cloud: GCP,AWS,Azure
● Docker Containers
19
Use Cases of Puppeteer
➔ Stealing Scraping content from websites and web applications;
➔ Automate tasks on web pages : form submission, keyboard and
mouse emulation;
➔ Web and UI testing : automated tests, browser features tests,
compatibility with Chrome versions;
➔ Taking screenshots and exporting web pages as PDF;
20
Simple Setup
21
npm install puppeteer
➔ Downloads the browser.
➔ No need to configure,link, otherwise to manage browser installation
➔ Just do npm install and ready to code
Initialize Puppeeteer
All code will go
in between these parenthesis.
//Screenshot
//Pdf
//Fake geolocation
22
const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
});
Examples
23
Visit a website
const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
const page = await browser.newPage();
await page.setViewport({ width: 1280, height: 800 })
await page.goto('https://pptr.dev/');
await browser.close();
});
24
➔ Launch puppeteer
➔ set a newpage
➔ Set viewport on that
page
➔ Open the address on
that page
➔ Close the browser
25
26
nothing happens and that’s normal !
Demo
27
remember it is headless Chrome so no UI.
To see what’s happening you could add this launch option to
disable the headless mode in line 2. {headless:false}
Demo
Visit a website (headful mode)
28
puppeteer.launch({headless: false}).then(async browser => {
Using devtools without opening devtools
29
Most thing we do manually in browser
can be done using puppeteer. We can use chrome dev-tools
Without opening devtools
We can use the features of
devtools in puppeteer
DevTools protocol
Puppeteer control headless Chrome or Chromium
over the DevTools Protocol
30
The Chrome DevTools Protocol allows for tools to
instrument,inspect, debug.
Code Coverage
31
Extract code coverage using puppeteer
32
code:
Extract code coverage using puppeteer
33
output:
● Navigating by URL
● Emulating Devices
● Handling Events
● Operating Mouse
● Code Coverage
We can do More...
34
● Operating Keyboard
● Taking Screenshots
● Generating PDF
● Faking Geolocation
● Accessibility
35
➔ If you need to visually observe your test on the browser
➔ It does not give you exact feedback of what your customers will
actually experience on your website(Page loading speeds ...etc)
➔ If you need to do lots of debugging, headless debugging can be
difficult.
➔ Headless Browsers sometimes may throw errors that is not observed
on real browsers
When should we not use headless Browsers?
Headless browser: puppeteer and git client : GitKraken
GitKraken is a Git GUI client for Windows, Mac and Linux.
It helps developers become more productive and efficient with Git.
Developed by -
Features of GitKraken
● Built-in merge tool
● Single-click undo-redo functions
● Keyboard shortcuts
● Support for Git Hooks, Gitflow, Submodules
● Built in SSH authentication
● Interactive Rebase
● Commit signing, etc
Along with some common git actions like -
Features of GitKraken
■ Undo
■ Redo
■ Pull
■ Push
■ Branch
■ Stash
■ Pop Stash
■ Squash
■ Drop, etc.
Features of GitKraken
Integrations with -
GitHub.com
Azure DevOps
(VSTS)
GitLab
GitLab.com Bitbucket.org
Pros & Cons
Why GitKraken?
★ Cross-platform
○ Windows
○ Linux
○ Mac
★ Intuitive UI/UX
○ Visual commit history
○ Drag & Drop
○ Fuzzy finder
○ 1-click undo-redo
★ Speed and responsiveness
★ Merge conflict editor
★ Built-in code editor
○ Diff split view
○ Syntax highlighting
○ Search within files
○ File minimap
★ Issue tracking
○ Glo board
○ GitKraken timelines
★ Offers a simple way of undoing
mistakes
Glo Boards
GitKraken
Timeline
73 companies reportedly use GitKraken in their tech stacks,
including Statista, Goodwings, and Tradecore
1.7 Million+ Devs Rely on GitKraken
The GitKraken is constantly updated
Cons of GitKraken
- Setting up auth with Git providers can be a pain
- No option to push tags with commits (have to push them separately and individually)
- Pricey
- Cannot access multiple repositories in the same session.
Merge Conflicts
● Tool resolve
● Deleted files
● Drag & Drop branch to merge
Merge vs Rebase
Merge vs Rebase
Some GitKraken Tips
1. If you want to see just the commits for a specific branch, use the
soloing function.
2. Use GitKraken’s fuzzy finder to quickly open a repo, view file history,
and more.
3. Pull any branch, even if it isn’t checked out. Just select “Pull” in the
branch actions context menu (you can also push the branch the same
way).
4. Resize the commit graph to optimize space for repos with many
branches, even down to a single column.
5. Scale the UI to your liking with ⌘ | Ctrl + +/-, the zoom selector, or the
fuzzy finder.
6. Forgot something in your previous commit’s message? Amend it by clicking
the message in
the right panel.
7. Drag-and-drop one remote onto another to quickly create a PR without
leaving GitKraken.
8. Select multiple commits in the graph and easily squash them with 1-click.
Use undo to reset
if necessary.
9. Use the fuzzy finder (⌘ | Ctrl + P) to quickly switch repos without leaving
the keyboard.
10. Keyboard shortcuts list: ( ⌘+/ ) for Mac, ( Ctrl+/ ) for Windows.
THANK YOU
1 sur 54

Recommandé

HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021) par
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)Igalia
192 vues32 diapositives
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020) par
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)
What's new with JavaScript in GNOME: The 2020 edition (GUADEC 2020)Igalia
64 vues67 diapositives
Writing native Linux desktop apps with JavaScript par
Writing native Linux desktop apps with JavaScriptWriting native Linux desktop apps with JavaScript
Writing native Linux desktop apps with JavaScriptIgalia
201 vues48 diapositives
WPE WebKit for Android par
WPE WebKit for AndroidWPE WebKit for Android
WPE WebKit for AndroidIgalia
68 vues22 diapositives
Gwt.Create Keynote San Francisco par
Gwt.Create Keynote San FranciscoGwt.Create Keynote San Francisco
Gwt.Create Keynote San FranciscoRay Cromwell
8.7K vues47 diapositives
Building at a glance par
Building at a glanceBuilding at a glance
Building at a glanceGabriel Dogaru
399 vues15 diapositives

Contenu connexe

Tendances

Vagrant and puppet: Deployment made easy par
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyGeronimo Orozco
1.3K vues27 diapositives
Volunteering at YouSee on Technology Support par
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportYouSee
1K vues12 diapositives
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade... par
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...Igalia
1.3K vues21 diapositives
Kiosk-mode browser using Chromium Embedded Framework (CEF) par
Kiosk-mode browser using Chromium Embedded Framework (CEF)Kiosk-mode browser using Chromium Embedded Framework (CEF)
Kiosk-mode browser using Chromium Embedded Framework (CEF)Igalia
242 vues10 diapositives
LCU14 208- Chromium-Blink Migration for RDK par
LCU14 208- Chromium-Blink Migration for RDKLCU14 208- Chromium-Blink Migration for RDK
LCU14 208- Chromium-Blink Migration for RDKLinaro
4.7K vues9 diapositives
The Internal Architecture of Chrome Developer Tools par
The Internal Architecture of Chrome Developer ToolsThe Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer ToolsMiroslav Bajtoš
2.4K vues21 diapositives

Tendances(20)

Vagrant and puppet: Deployment made easy par Geronimo Orozco
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easy
Geronimo Orozco1.3K vues
Volunteering at YouSee on Technology Support par YouSee
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
YouSee1K vues
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade... par Igalia
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia1.3K vues
Kiosk-mode browser using Chromium Embedded Framework (CEF) par Igalia
Kiosk-mode browser using Chromium Embedded Framework (CEF)Kiosk-mode browser using Chromium Embedded Framework (CEF)
Kiosk-mode browser using Chromium Embedded Framework (CEF)
Igalia242 vues
LCU14 208- Chromium-Blink Migration for RDK par Linaro
LCU14 208- Chromium-Blink Migration for RDKLCU14 208- Chromium-Blink Migration for RDK
LCU14 208- Chromium-Blink Migration for RDK
Linaro4.7K vues
The Internal Architecture of Chrome Developer Tools par Miroslav Bajtoš
The Internal Architecture of Chrome Developer ToolsThe Internal Architecture of Chrome Developer Tools
The Internal Architecture of Chrome Developer Tools
Miroslav Bajtoš2.4K vues
Fixing Gaps. Strengthening the Chromium platform for content blocking par Igalia
Fixing Gaps. Strengthening the Chromium platform for content blockingFixing Gaps. Strengthening the Chromium platform for content blocking
Fixing Gaps. Strengthening the Chromium platform for content blocking
Igalia112 vues
Driving and virtualizing control systems: the Open Source approach used in Wh... par Igalia
Driving and virtualizing control systems: the Open Source approach used in Wh...Driving and virtualizing control systems: the Open Source approach used in Wh...
Driving and virtualizing control systems: the Open Source approach used in Wh...
Igalia411 vues
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020) par Igalia
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Igalia80 vues
Turducken - Divide and Conquer large GWT apps with multiple teams par Robert Keane
Turducken - Divide and Conquer large GWT apps with multiple teamsTurducken - Divide and Conquer large GWT apps with multiple teams
Turducken - Divide and Conquer large GWT apps with multiple teams
Robert Keane6.3K vues
All Work Responsibilities in my whole Life-Testing Profession par Gopi Raghavendra
All Work Responsibilities in my whole  Life-Testing  ProfessionAll Work Responsibilities in my whole  Life-Testing  Profession
All Work Responsibilities in my whole Life-Testing Profession
Gopi Raghavendra435 vues
Embedding Chromium into AGL demo platform with WAM par Igalia
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
Igalia312 vues
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution par juanjosanchezpenas
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
juanjosanchezpenas9.5K vues

Similaire à Headless browser: puppeteer and git client : GitKraken

MockServer-driven testing par
MockServer-driven testingMockServer-driven testing
MockServer-driven testingTestableapple
5 vues108 diapositives
2013-03-07 indie developer toolkit par
2013-03-07 indie developer toolkit2013-03-07 indie developer toolkit
2013-03-07 indie developer toolkitCocoaHeads Tricity
302 vues32 diapositives
iOS Indie Developer Toolkit - CocoaHeads 3city par
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3cityMichał Zygar
691 vues32 diapositives
Headless browser a stepping stone towards developing smarter web applicatio... par
Headless browser   a stepping stone towards developing smarter web applicatio...Headless browser   a stepping stone towards developing smarter web applicatio...
Headless browser a stepping stone towards developing smarter web applicatio...Bala Murugan
27 vues6 diapositives
More Dev. Less Drama.pdf par
More Dev. Less Drama.pdfMore Dev. Less Drama.pdf
More Dev. Less Drama.pdfWP Engine
373 vues58 diapositives
Intro to GitOps & Flux.pdf par
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdfWeaveworks
325 vues24 diapositives

Similaire à Headless browser: puppeteer and git client : GitKraken(20)

iOS Indie Developer Toolkit - CocoaHeads 3city par Michał Zygar
iOS Indie Developer Toolkit - CocoaHeads 3cityiOS Indie Developer Toolkit - CocoaHeads 3city
iOS Indie Developer Toolkit - CocoaHeads 3city
Michał Zygar691 vues
Headless browser a stepping stone towards developing smarter web applicatio... par Bala Murugan
Headless browser   a stepping stone towards developing smarter web applicatio...Headless browser   a stepping stone towards developing smarter web applicatio...
Headless browser a stepping stone towards developing smarter web applicatio...
Bala Murugan27 vues
More Dev. Less Drama.pdf par WP Engine
More Dev. Less Drama.pdfMore Dev. Less Drama.pdf
More Dev. Less Drama.pdf
WP Engine373 vues
Intro to GitOps & Flux.pdf par Weaveworks
Intro to GitOps & Flux.pdfIntro to GitOps & Flux.pdf
Intro to GitOps & Flux.pdf
Weaveworks325 vues
GT-Mconf - Transfer of Technology Course par mconf
GT-Mconf - Transfer of Technology CourseGT-Mconf - Transfer of Technology Course
GT-Mconf - Transfer of Technology Course
mconf2K vues
vodQA Pune (2019) - Browser automation using dev tools par vodQA
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
vodQA642 vues
Electron JS | Build cross-platform desktop applications with web technologies par Bethmi Gunasekara
Electron JS | Build cross-platform desktop applications with web technologiesElectron JS | Build cross-platform desktop applications with web technologies
Electron JS | Build cross-platform desktop applications with web technologies
Bethmi Gunasekara2.5K vues
Puppeteer - Headless Chrome Node API par ubunturk
Puppeteer - Headless Chrome Node APIPuppeteer - Headless Chrome Node API
Puppeteer - Headless Chrome Node API
ubunturk441 vues
Technical Tips: Visual Regression Testing and Environment Comparison with Bac... par Building Blocks
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Building Blocks2.4K vues
CIP Developing Curator Tool Wizards par Edwin Rojas
CIP Developing Curator Tool WizardsCIP Developing Curator Tool Wizards
CIP Developing Curator Tool Wizards
Edwin Rojas174 vues
JS digest. November 2017 par ElifTech
JS digest. November 2017JS digest. November 2017
JS digest. November 2017
ElifTech469 vues
Programming for non tech entrepreneurs par Rodrigo Gil
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil772 vues
Head first android apps dev tools par Shaka Huang
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
Shaka Huang3.9K vues
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You par Weaveworks
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks7 vues
BLUG 2012 Version Control for Notes Developers par Martin Jinoch
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch2.5K vues

Dernier

GDSC Mikroskil Members Onboarding 2023.pdf par
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdfgdscmikroskil
12 vues62 diapositives
MSA Website Slideshow (16).pdf par
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdfmsaucla
64 vues8 diapositives
Machine Element II Course outline.pdf par
Machine Element II Course outline.pdfMachine Element II Course outline.pdf
Machine Element II Course outline.pdfodatadese1
8 vues2 diapositives
Searching in Data Structure par
Searching in Data StructureSearching in Data Structure
Searching in Data Structureraghavbirla63
5 vues8 diapositives
Digital Watermarking Of Audio Signals.pptx par
Digital Watermarking Of Audio Signals.pptxDigital Watermarking Of Audio Signals.pptx
Digital Watermarking Of Audio Signals.pptxAyushJaiswal781174
11 vues25 diapositives
Activated sludge process .pdf par
Activated sludge process .pdfActivated sludge process .pdf
Activated sludge process .pdf8832RafiyaAltaf
9 vues32 diapositives

Dernier(20)

GDSC Mikroskil Members Onboarding 2023.pdf par gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil12 vues
MSA Website Slideshow (16).pdf par msaucla
MSA Website Slideshow (16).pdfMSA Website Slideshow (16).pdf
MSA Website Slideshow (16).pdf
msaucla64 vues
Machine Element II Course outline.pdf par odatadese1
Machine Element II Course outline.pdfMachine Element II Course outline.pdf
Machine Element II Course outline.pdf
odatadese18 vues
SUMIT SQL PROJECT SUPERSTORE 1.pptx par Sumit Jadhav
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptx
Sumit Jadhav 12 vues
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,... par AakashShakya12
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
Literature review and Case study on Commercial Complex in Nepal, Durbar mall,...
AakashShakya1266 vues
Design of machine elements-UNIT 3.pptx par gopinathcreddy
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptx
gopinathcreddy32 vues
Advances in micro milling: From tool fabrication to process outcomes par Shivendra Nandan
Advances in micro milling: From tool fabrication to process outcomesAdvances in micro milling: From tool fabrication to process outcomes
Advances in micro milling: From tool fabrication to process outcomes

Headless browser: puppeteer and git client : GitKraken

  • 1. 1 The Magic of Headless Browser + Puppeteer: Using DevTools Without opening DevTools & GitKraken as a legendary Git GUI Client
  • 2. hello! We are the interns.. 2
  • 3. 3 The Magic of Headless Browser + Puppeteer: Using DevTools Without opening DevTools
  • 4. 4 What is Headless browser? ➔ running a script or test against a browser but without the browser, UI starting up. ➔ controlled programmatically ➔ executed via a command-line interface or using network communication.
  • 5. 5 Use Cases of headless browser ➔ Test automation in modern web applications. ➔ Taking screenshots of web pages. ➔ Running automated tests for JavaScript libraries. ➔ Scraping websites for data. ➔ Automating interaction of web pages.
  • 6. 6 Examples of Headless Browsers PhantomJS Chrome Firefox CasperJS
  • 7. 7 Headless chrome (chrome without chrome) A way to run chrome browser in a headless environment
  • 8. 8 Headless chrome (chrome without chrome) ➔ Brings all the web platform features provide by chromium and blink in rendering engine to command line. ➔ Available in chrome59 version.
  • 9. Headless Chrome and it’s popularity ➔ support for major desktop, server, and mobile operating systems. ➔ has convenient development tools. ➔ any additional useful features for Devs. ➔ Puppeteer. 9
  • 10. 10 two ways to use Headless Chromium: ➔ via the DevTools remote debugging protocol <using command line> ➔ from Node.js <using noje libraries>
  • 12. 12 programmatically(Node) <using puppeteer> const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); // Navigates to the project README file await page.goto('https://github.com/GoogleChrome/puppeteer/blob/master/README.md'); // Generates a PDF from the page content await page.pdf({ path: 'overview.pdf' }); await browser.close(); })();
  • 13. Why Testing Is A scary thing for the developers? ➔ Test is slow and complicated. ➔ Maintaining test can require more time than actually writing your website 13
  • 14. Why Webtests Slow Launching new browser in every single test. 14 But,it makes your tests slow
  • 15. IS There Any Solution?? 15
  • 16. With Puppeteer tests are fast 16 How? Browser Context, a high level API which isolates your page from one another.
  • 18. Puppeteer ➔ Browser Automation Library ➔ Puppeteer=Node.js+Chrome ➔ Open pages navigate to website,evaluate javascript 18 ➔ Same thing as any NPM library ➔ Any test runner:jest,ava,mocha……..
  • 19. Runs Everywhere ● Desktop: Mac,Windows, Linux ● CI: Travis-CI,AppVeyor ● Cloud: GCP,AWS,Azure ● Docker Containers 19
  • 20. Use Cases of Puppeteer ➔ Stealing Scraping content from websites and web applications; ➔ Automate tasks on web pages : form submission, keyboard and mouse emulation; ➔ Web and UI testing : automated tests, browser features tests, compatibility with Chrome versions; ➔ Taking screenshots and exporting web pages as PDF; 20
  • 21. Simple Setup 21 npm install puppeteer ➔ Downloads the browser. ➔ No need to configure,link, otherwise to manage browser installation ➔ Just do npm install and ready to code
  • 22. Initialize Puppeeteer All code will go in between these parenthesis. //Screenshot //Pdf //Fake geolocation 22 const puppeteer = require('puppeteer'); puppeteer.launch().then(async browser => { });
  • 24. Visit a website const puppeteer = require('puppeteer'); puppeteer.launch().then(async browser => { const page = await browser.newPage(); await page.setViewport({ width: 1280, height: 800 }) await page.goto('https://pptr.dev/'); await browser.close(); }); 24 ➔ Launch puppeteer ➔ set a newpage ➔ Set viewport on that page ➔ Open the address on that page ➔ Close the browser
  • 25. 25
  • 26. 26 nothing happens and that’s normal ! Demo
  • 27. 27 remember it is headless Chrome so no UI. To see what’s happening you could add this launch option to disable the headless mode in line 2. {headless:false} Demo
  • 28. Visit a website (headful mode) 28 puppeteer.launch({headless: false}).then(async browser => {
  • 29. Using devtools without opening devtools 29 Most thing we do manually in browser can be done using puppeteer. We can use chrome dev-tools Without opening devtools We can use the features of devtools in puppeteer
  • 30. DevTools protocol Puppeteer control headless Chrome or Chromium over the DevTools Protocol 30 The Chrome DevTools Protocol allows for tools to instrument,inspect, debug.
  • 32. Extract code coverage using puppeteer 32 code:
  • 33. Extract code coverage using puppeteer 33 output:
  • 34. ● Navigating by URL ● Emulating Devices ● Handling Events ● Operating Mouse ● Code Coverage We can do More... 34 ● Operating Keyboard ● Taking Screenshots ● Generating PDF ● Faking Geolocation ● Accessibility
  • 35. 35 ➔ If you need to visually observe your test on the browser ➔ It does not give you exact feedback of what your customers will actually experience on your website(Page loading speeds ...etc) ➔ If you need to do lots of debugging, headless debugging can be difficult. ➔ Headless Browsers sometimes may throw errors that is not observed on real browsers When should we not use headless Browsers?
  • 37. GitKraken is a Git GUI client for Windows, Mac and Linux. It helps developers become more productive and efficient with Git. Developed by -
  • 38. Features of GitKraken ● Built-in merge tool ● Single-click undo-redo functions ● Keyboard shortcuts ● Support for Git Hooks, Gitflow, Submodules ● Built in SSH authentication ● Interactive Rebase ● Commit signing, etc Along with some common git actions like -
  • 39. Features of GitKraken ■ Undo ■ Redo ■ Pull ■ Push ■ Branch ■ Stash ■ Pop Stash ■ Squash ■ Drop, etc.
  • 40. Features of GitKraken Integrations with - GitHub.com Azure DevOps (VSTS) GitLab GitLab.com Bitbucket.org
  • 43. ★ Cross-platform ○ Windows ○ Linux ○ Mac ★ Intuitive UI/UX ○ Visual commit history ○ Drag & Drop ○ Fuzzy finder ○ 1-click undo-redo ★ Speed and responsiveness ★ Merge conflict editor ★ Built-in code editor ○ Diff split view ○ Syntax highlighting ○ Search within files ○ File minimap ★ Issue tracking ○ Glo board ○ GitKraken timelines ★ Offers a simple way of undoing mistakes
  • 46. 73 companies reportedly use GitKraken in their tech stacks, including Statista, Goodwings, and Tradecore 1.7 Million+ Devs Rely on GitKraken The GitKraken is constantly updated
  • 47. Cons of GitKraken - Setting up auth with Git providers can be a pain - No option to push tags with commits (have to push them separately and individually) - Pricey - Cannot access multiple repositories in the same session.
  • 48. Merge Conflicts ● Tool resolve ● Deleted files ● Drag & Drop branch to merge
  • 52. 1. If you want to see just the commits for a specific branch, use the soloing function. 2. Use GitKraken’s fuzzy finder to quickly open a repo, view file history, and more. 3. Pull any branch, even if it isn’t checked out. Just select “Pull” in the branch actions context menu (you can also push the branch the same way). 4. Resize the commit graph to optimize space for repos with many branches, even down to a single column. 5. Scale the UI to your liking with ⌘ | Ctrl + +/-, the zoom selector, or the fuzzy finder.
  • 53. 6. Forgot something in your previous commit’s message? Amend it by clicking the message in the right panel. 7. Drag-and-drop one remote onto another to quickly create a PR without leaving GitKraken. 8. Select multiple commits in the graph and easily squash them with 1-click. Use undo to reset if necessary. 9. Use the fuzzy finder (⌘ | Ctrl + P) to quickly switch repos without leaving the keyboard. 10. Keyboard shortcuts list: ( ⌘+/ ) for Mac, ( Ctrl+/ ) for Windows.