3 options
UI testing with puppeteer : implement end-to-end testing and browser automation using javascript and node.js / Dario Kondratiuk.
- Format:
- Book
- Author/Creator:
- Kondratiuk, Dario, author.
- Language:
- English
- Subjects (All):
- Puppeteer (Computer file).
- User interfaces (Computer systems)--Testing.
- User interfaces (Computer systems).
- User interfaces (Computer systems)--Design.
- Physical Description:
- 1 online resource (316 pages)
- Place of Publication:
- Birmingham, England ; Mumbai : Packt Publishing, [2021]
- Biography/History:
- Kondratiuk Dario: Dario Kondratiuk is a web developer since 2001. He won the Microsoft MVP (most valuable professional) award in 2020 for his contributions to the developer community. Dario has been working with Puppeteer since the beta versions, back in 2017. He is the author of Puppeteer-Sharp, a Puppeteer port to. NET, and Playwright-Sharp, a Playwright port to. NET.
- Summary:
- Explore Google's open source web automation library Puppeteer to perform tasks such as end-to-end testing, performance monitoring, and task automation with ease. Using real-world use cases, this book will help you learn the capabilities and best practices of Puppeteer to take your automation code to the next level.
- Contents:
- Cover
- Title page
- Copyright and Credits
- Dedicated
- Contributors
- Table of Contents
- Preface
- Chapter 1: Getting started with Puppeteer
- What is browser automation?
- Selenium and Puppeteer
- Introducing Headless browsers
- Available headless browsers
- The Chromium DevTools Protocol
- Introducing Puppeteer
- The Puppeteer object model
- Puppeteer use cases
- Task Automation
- Web Scraping
- Content generation
- End-to-end testing
- Setting up the environment
- Node.js
- Visual Studio Code
- Our first Puppeteer code
- Installing Puppeteer
- Hello world in Puppeteer
- Asynchronous programming in JavaScript
- Promise.all
- Promise.race
- Fulfilling our own promises
- Summary
- Chapter 2: Automated Testing and Test runners
- Technical requirements
- Introduction to Automated Testing
- Unit tests
- Service tests
- End-to-end tests
- Test runner features
- Available test runners
- Creating our first test project
- Organizing our code
- Introducing the Page Object Model
- Chapter 3: Navigating through a website
- Introducing the tests sites for this chapter
- Creating a Puppeteer browser
- Using the Puppeteer.launch function
- Headless
- The user data directory
- Executable Path
- Default Viewport
- Product
- Browser Arguments
- Mobile options
- Options in practice
- Navigating through a site
- Timeouts
- waitUntil
- Referrer
- Using the response object
- Getting the response URL
- Getting the response status code
- Introduction to continuous integration
- Chapter 4: Interacting with a page
- Introduction to HTML, the DOM, and CSS
- HTML
- The DOM
- CSS Selectors
- Finding elements
- Finding elements using XPath
- Interacting with Elements
- Typing on input elements
- Clicking on elements.
- Selecting options in drop-down lists
- Keyboard and Mouse emulation
- Debugging tests with Visual Studio Code
- Chapter 5: Waiting for elements and network calls
- Waiting for the page to load
- Waiting for elements
- Await a wait function
- Waiting for network calls
- Arrange, Act, Await
- Fire and forget
- Waiting for page events
- The close event
- The popup event
- Target created event
- The console event
- The dialog event
- The headless recorder
- Chapter 6: Executing and Injecting JavaScript
- Executing JavaScript code
- Variable scopes in JavaScript
- Manipulating handles with JavaScript code
- Getting information from the elements
- Acting on elements
- Enforcing server rules
- Finding elements using JavaScript
- Waiting for functions
- Exposing local functions
- Running our checks with Checkly
- Chapter 7: Generating Content with Puppeteer
- Taking screenshots
- Using screenshots for regression tests
- Generate PDF files
- Creating HTML content
- Chapter 8: Environments emulation
- Understanding the browser's market share
- The browser's popularity over the years
- Operative Systems market share
- Screen resolution distribution
- Emulating mobile devices
- The Viewport
- Pixel ratio
- The touchscreen
- The user agent
- Emulating mobile devices with Puppeteer
- Emulating network conditions
- Emulating localization
- Emulating geolocation
- Emulating time zones
- Emulating languages
- Other emulations
- Chapter 9: Scraping tools
- Introduction to web scraping
- Does the site allow scrapers?
- Creating scrapers
- Running scrapers in parallel
- How to avoid being detected as a bot.
- Dealing with authorization
- Chapter 10: Evaluating and Improving the Performance of a Website
- The Issue of Performance
- Getting started with Google Lighthouse
- As part of Chrome DevTools
- Using PageSpeed Insights
- Using the command line
- Using the node module
- The performance category
- Using Lighthouse for testing
- Tracing Pages
- Analyzing code coverage
- Why subscribe?
- About Packt
- Other Books You May Enjoy
- Index.
- Notes:
- Description based on print version record.
- ISBN:
- 9781800203761
- 1800203764
- OCLC:
- 1241664423
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.