Hands-On Selenium WebDriver with Java - Helion
ISBN: 9781098109950
stron: 422, Format: ebook
Data wydania: 2022-03-31
Księgarnia: Helion
Cena książki: 194,65 zł (poprzednio: 226,34 zł)
Oszczędzasz: 14% (-31,69 zł)
Get started with Selenium WebDriver, the open source library for automating tests to ensure your web application performs as expected. In this practical hands-on book, author Boni Garcia takes Java developers through Selenium's main features for automating web navigation, browser manipulation, web element interaction, and more, with ready-to-be-executed test examples.
You'll start by learning the core features of Selenium (composed of WebDriver, Grid, and IDE) and its ecosystem. Discover why Selenium WebDriver is the de facto library for developing end-to-end tests on your web application. You'll explore ways to use advanced Selenium WebDriver features, including using web browsers in Docker containers or the DevTools protocol. Selenium WebDriver examples in this book are available on GitHub.
With this book, you'll learn how to:
- Set up a Java project containing end-to-end tests that use Selenium WebDriver
- Conduct automated interaction with web applications
- Use strategies for managing browser-specific capabilities and cross-browser testing
- Interact with web forms, manage pop-up messages, and execute JavaScript
- Control remote browsers and use advanced browser infrastructure for Selenium WebDriver tests in the cloud
- Model web pages using object-oriented classes to ease test maintenance and reduce code duplication
Osoby które kupowały "Hands-On Selenium WebDriver with Java", wybierały także:
- Windows Media Center. Domowe centrum rozrywki 66,67 zł, (8,00 zł -88%)
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Przywództwo w świecie VUCA. Jak być skutecznym liderem w niepewnym środowisku 58,64 zł, (12,90 zł -78%)
- Scrum. O zwinnym zarządzaniu projektami. Wydanie II rozszerzone 58,64 zł, (12,90 zł -78%)
- Od hierarchii do turkusu, czyli jak zarządzać w XXI wieku 58,64 zł, (12,90 zł -78%)
Spis treści
Hands-On Selenium WebDriver with Java eBook -- spis treści
- Foreword
- Preface
- Who Should Read This Book
- Why I Wrote This Book
- Navigating This Book
- Part I, Introduction
- Part II, The Selenium WebDriver API
- Part III, Advanced Concepts
- Conventions Used in This Book
- Using Code Examples
- OReilly Online Learning
- How to Contact Us
- Acknowledgments
- I. Introduction
- 1. A Primer on Selenium
- Selenium Core Components
- Selenium WebDriver
- Selenium Grid
- Selenium IDE
- Selenium Ecosystem
- Language Bindings
- Driver Managers
- Locator Tools
- Frameworks
- Browser Infrastructure
- Community
- Software Testing Fundamentals
- Levels of Testing
- Types of Testing
- Testing Methodologies
- Test Automation Tools
- Summary and Outlook
- Selenium Core Components
- 2. Preparing for Testing
- Requirements
- Java Virtual Machine
- Text Editor or IDE
- Browsers and Drivers
- Build Tools
- Optional Software
- Project Setup
- Project Layout
- Dependencies
- Selenium WebDriver
- Automated driver management
- Unit testing frameworks
- JUnit 4
- JUnit 5
- JUnit 5 with Selenium-Jupiter
- TestNG
- Fluent assertions
- Logging
- Hello World
- Using Additional Browsers
- Summary and Outlook
- Requirements
- II. The Selenium WebDriver API
- 3. WebDriver Fundamentals
- Basic WebDriver Usage
- WebDriver Creation
- WebDriver builder
- WebDriverManager builder
- WebDriver Methods
- Session Identifier
- WebDriver Disposal
- WebDriver Creation
- Locating WebElements
- The Document Object Model (DOM)
- WebElement Methods
- Location Strategies
- Locating by HTML tag name
- Locating by HTML attributes (name, id, class)
- Locating by link text
- Locating by CSS selectors
- Locating by XPath
- Finding Locators on a Web Page
- Compound Locators
- Relative Locators
- A challenging example
- What Strategy Should You Use?
- Keyboard Actions
- File Uploading
- Range Sliders
- Mouse Actions
- Web Navigation
- Checkboxes and Radio Buttons
- User Gestures
- Right-Click and Double-Click
- Mouseover
- Drag and Drop
- Click and Hold
- Copy and Paste
- Waiting Strategies
- Implicit Wait
- Explicit Wait
- Fluent Wait
- Summary and Outlook
- Basic WebDriver Usage
- 4. Browser-Agnostic Features
- Executing JavaScript
- Synchronous Scripts
- Scrolling
- Color picker
- Pinned Scripts
- Asynchronous Scripts
- Synchronous Scripts
- Timeouts
- Page Loading Timeout
- Script Loading Timeout
- Screenshots
- WebElement Screenshots
- Window Size and Position
- Browser History
- The Shadow DOM
- Cookies
- Dropdown Lists
- Data List Elements
- Navigation Targets
- Tabs and Windows
- Frames and Iframes
- Dialog Boxes
- Alerts, Confirms, and Prompts
- Modal Windows
- Web Storage
- Event Listeners
- WebDriver Exceptions
- Summary and Outlook
- Executing JavaScript
- 5. Browser-Specific Manipulation
- Browser Capabilities
- Headless Browser
- Page Loading Strategies
- Device Emulation
- Web Extensions
- Geolocation
- Notifications
- Browser Binary
- Web Proxies
- Log Gathering
- Get User Media
- Loading Insecure Pages
- Localization
- Incognito
- Edge in Internet Explorer Mode
- The Chrome DevTools Protocol
- CDP Selenium Wrappers
- Network interceptor
- Basic and digest authentication
- CDP Raw Commands
- Emulate network conditions
- Network monitoring
- Full-page screenshot
- Performance metrics
- Extra headers
- Block URLs
- Device emulation
- Console listeners
- Geolocation override
- Manage cookies
- Load insecure pages
- CDP Selenium Wrappers
- Location Context
- Web Authentication
- Print Page
- WebDriver BiDi
- Summary and Outlook
- Browser Capabilities
- 6. Remote WebDriver
- Selenium WebDriver Architecture
- Creation of RemoteWebDriver Objects
- RemoteWebDriver Constructor
- RemoteWebDriver Builder
- WebDriverManager Builder
- Selenium-Jupiter
- Selenium Grid
- Standalone
- From the shell
- From Java code
- Hub-nodes
- Fully Distributed
- Node registration
- New session
- WebDriver commands
- Setting up a distributed grid
- Observability
- Tracing with OpenTelemetry
- GraphQL queries
- Configuration
- Standalone
- Cloud Providers
- Browsers in Docker Containers
- Docker Images for Selenium Grid
- Standalone
- Hub-nodes
- Further features
- Selenoid
- Further features
- WebDriverManager
- Further features
- Selenium-Jupiter
- Docker Images for Selenium Grid
- Summary and Outlook
- III. Advanced Concepts
- 7. The Page Object Model (POM)
- Motivation
- The POM Design Pattern
- Page Objects
- Robust Page Objects
- Creating a Domain Specific Language (DSL)
- Page Factory
- Summary and Outlook
- 8. Testing Framework Specifics
- Parameterized Tests
- Cross-Browser Testing
- Categorizing and Filtering Tests
- Ordering Tests
- Failure Analysis
- Retrying Tests
- Parallel Test Execution
- Test Listeners
- Disabled Tests
- Summary and Outlook
- Parameterized Tests
- 9. Third-Party Integrations
- File Download
- Using Browser-Specific Capabilities
- Using an HTTP Client
- Capture Network Traffic
- Nonfunctional Testing
- Performance
- Using browsers to generate the load
- Security
- Accessibility
- A/B Testing
- Performance
- Fluent API
- Test Data
- Reporting
- Behavior Driven Development
- Web Frameworks
- Summary and Outlook
- File Download
- 10. Beyond Selenium
- Mobile Apps
- Mobile Testing
- Appium
- A basic Appium test
- REST Services
- REST Assured
- Alternatives to Selenium
- Cypress
- WebDriverIO
- TestCafe
- Puppeteer
- Playwright
- Summary and Final Remarks
- Mobile Apps
- A. Whats New in Selenium 4
- Selenium WebDriver
- Migration Guide
- Locators
- User gestures
- Waits and timeouts
- Event listeners
- Capabilities
- Migration Guide
- Selenium Grid
- Migration guide
- Selenium IDE
- Other Novelties
- Selenium WebDriver
- B. Driver Management
- WebDriverManager: Automated Driver Management
- Generic Manager
- Advanced Configuration
- Other Uses
- Manual Driver Management
- Download
- Setup
- Maintenance
- Summary
- WebDriverManager: Automated Driver Management
- C. Examples Repository Setup
- Project Layout
- Maven
- Common Setup
- JUnit 4
- JUnit 5
- Selenium-Jupiter
- TestNG
- Other Dependencies
- Gradle
- JUnit 4
- JUnit 5
- Selenium-Jupiter
- TestNG
- Other Dependencies
- Logging
- GitHub Actions
- Dependabot
- Summary
- Index