更新时间:2021-06-24 13:26:48
coverpage
Title Page
Copyright
Learn Selenium
Contributors
About the authors
Packt is searching for authors like you
About Packt
Why subscribe?
Packt.com
Preface
Who this book is for
What this book covers
To get the most out of this book
Installing Java
Installing Eclipse
Download the example code files
Conventions used
Get in touch
Reviews
Introducing WebDriver and WebElements
Selenium Testing Tools
Selenium WebDriver
Selenium Server
Selenium IDE
Differences between Selenium 2 and Selenium 3
Handling the browser
Having better APIs
Having developer support and advanced functionalities
Testing Mobile Apps with Appium
Setting up a project in Eclipse with Maven and TestNG using Java
WebElements
Locating WebElements using WebDriver
The findElement method
The findElements method
Inspecting Elements with Developer Tools
Inspecting pages and elements with Mozilla Firefox
Inspecting pages and elements in Google Chrome with Developer Tools
Using the By locating mechanism
The By.id() method
The By.name() method
The By.className() method
The By.linkText() method
The By.partialLinkText() method
The By.tagName() method
The By.xpath() method
The By.cssSelector() method
Interacting with WebElements
Getting element properties and attributes
The getAttribute() method
The getText() method
The getCssValue() method
The getLocation() method
The getSize() method
The getTagName() method
Performing actions on WebElements
The sendKeys() method
The clear() method
The submit() method
Checking the WebElement state
The isDisplayed() method
The isEnabled() method
The isSelected() method
Summary
Questions
Further information
Using Java 8 Features with Selenium
Introducing Java 8 Stream API
Stream.filter()
Stream.sort()
Stream.map()
Stream.collect()
Stream.min() and Stream.max()
Stream.count()
Using Stream API with Selenium WebDriver
Filtering and counting WebElements
Filtering element attributes
Using the Map function to get the text value from elements
Filtering and performing actions on WebElements
Exploring the Features of WebDriver
Taking screenshots
Locating target windows and Frames
Switching among windows
Switching between frames
Handling alerts
Exploring Navigate
Waiting for WebElements to load
Implicit wait time
Explicit wait time
Handling cookies
Exploring Advanced Interactions of WebDriver
Understanding the build and perform actions
Learning mouse based interactions
The moveByOffset action