更新时间:2021-06-24 18:26:54
coverpage
Selenium WebDriver Quick Start Guide
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Code in action
Conventions used
Get in touch
Reviews
Introducing Selenium WebDriver and Environment Setup
Technical requirements
Why is test automation required?
Advantages of test automation
Some pointers on Selenium
What's new in Java 8
Lambda expressions and functional interfaces
Functional interfaces
Default and static methods in an interface
The forEach method for a collection
Streams in Java 8
Understanding Selenium RC
What is cross-site scripting (XSS)?
Introducing Selenium WebDriver
Class structure of Selenium WebDriver
Drivers in Selenium
Remote WebDriver
Mobile drivers
Headless browsers
Why do we need headless browsers?
Preparing for the very first script
Installing Java 8
Setting up Eclipse
Downloading Eclipse
Creating a Maven project
Understanding pom.xml
Manual configuration
Creating the first script
Summary
Understanding the Document Object Model and Creating Customized XPaths
What is the DOM?
WebElements
SearchContext interface
DOM traversal
Dissecting the By class
The two types of XPaths
Understanding customized XPaths
Customized CSS
An example traversal
Understanding the text() methods
Finding elements within the container element
Best practice
Extracting WebElements dynamically using tagName
Properties file for WebElements
Prerequisites for automating mobile applications
XPaths for mobile applications
Finding XPaths for mobile browser applications
Connecting the actual mobile device
How to use Screencast
Appium Inspector window
How to use UIAutomatorViewer
Mobile locators
What is a WebView?
Introducing the Fillo API
Debugging in Eclipse
Basic Selenium Commands and Their Usage in Building a Framework
What are method signatures?
What are Lists in java?
Important methods in Selenium
Some common reusable methods
The difference between quit() and close()
Understanding the keyword driven framework
Concept of Map and HashMap
Bird's eye view of the framework
Introducing the testng XML file
Triggering the testng XML from within the POM XML file
Handling errors while running pom.xml
Introducing the log4j framework
Extent Reports
How to use Extent Reports in code?
Handling Popups Frames and Alerts
Window handles
Fetching the window handles
Understanding the Set interface
A look at the iterator() method
Modal and non-modal dialog