售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright and Credits
Mastering Selenium WebDriver 3.0 Second Edition
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Packt Upsell
Why subscribe?
PacktPub.com
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Conventions used
Get in touch
Reviews
Creating a Fast Feedback Loop
Making it easy for developers to run tests
Building our test project with Apache Maven
Running your tests in parallel
Parallel tests with TestNG
There are no silver bullets
Multiple browser support
Downloading WebDriver binaries automatically
Going headless
What happened to GhostDriver?
Summary
Producing the Right Feedback When Failing
Location, location, location
Tests are living documentation
Reliability
The test automation team that works in isolation
Oh, that test always flickers – don't worry about it
Baking in reliability
Git
Subversion
Continuous integration is key
Setting up TeamCity
Setting up Jenkins
Extending our capabilities by using a Selenium-Grid
A picture paints a thousand words
Don't be afraid of the big bad stack trace
Summary
Exceptions Are Actually Oracles
NoSuchElementException
NoSuchFrameException
NoSuchWindowException
ElementNotVisibleException
StaleElementReferenceException
InvalidElementStateException
UnsupportedCommandException
UnreachableBrowserException
SessionNotFoundException
WebDriverException – element is not clickable at point
NoAlertPresentException
Summary
The Waiting Game
Are we nearly ready yet?
I've timed it, and I know it takes 5 seconds for the page to load
Machine specification
Server specification
JavaScript engine performance
Networks
So, what do we do?
I just want Selenium to do it for me
Page load timeout
Script timeout
Implicitly wait timeout
It can slow my tests down?
It can break explicit waits?
The explicit wait that never finds an element
Hang on, I've tried this and it didn't work that way for me!
The explicit wait that works, but slows your tests down
The solution
Using explicit waits
Fluent waits, the core of explicit waits
Functions
Java8 lambdas
Summary
Working with Effective Page Objects
Why do you keep repeating yourself?
Starting out with page objects
Separation of concerns with page objects
Introducing the Java PageFactory class
Using PageFactory annotations
Initializing proxied objects
Problems with the Java PageFactory class
Introducing the Query object
So, which option should I use?
Creating extensible page objects
Turning your page objects into a readable DSL
Fluent page objects
Summary
Utilizing the Advanced User Interactions API
Getting started with the API
Using the API to solve difficult problems
Working with hover menus
Working with drag and drop
Working with offsets
Working with access keys
The Advanced Interactions API doesn't always work for me
Summary
JavaScript Execution with Selenium
Introducing the JavaScript executor
Let's not get carried away
So, what should we do with it?
A more complex example
Executing complex blocks of JavaScript with the JavascriptExecutor
Can I use JavaScript libraries?
Should I inject JavaScript libraries?
What about asynchronous scripts?
Building user interaction into your automation
Summary
Keeping It Real
File downloads with Selenium
The scenario
The problem
So, what's next?
Do you really need to download that file?
Checking that links are valid
What if I do need to download the file?
AutoIt
Java Robot class
Browser auto download
Extending our existing code
Downloading a file with the help of Selenium
But that's not the same as clicking on a link and downloading the file
Checking that the file we have downloaded is the correct one
You cannot track network traffic with Selenium
But I really want to track my network traffic!
Writing performance tests with Selenium
Penetration testing with Selenium
Summary
Hooking Docker into Selenium
Introducing Docker
Spinning up Selenium-Grid with Docker
Running tests against our new Selenium-Grid
Starting up Docker containers as part of the build
Using a Docker Maven plugin
Using Docker compose
What about the negatives?
Summary
Selenium – the Future
Machine learning — the new Holy Grail
Visual validation
Applitools Eyes
So what has this got to do with AI?
Self healing tests
Having your tests written for you
Summary
Appendix A: Contributing to Selenium
Selenium is amazing – how can I help make it better?
Getting set up to contribute to a Selenium repository
Aiding the documentation effort
Making changes to Selenium
Keeping your history clean
Now it's your turn
Appendix B: Working with JUnit
Switching from TestNG to JUnit
Summary
Appendix C: Introduction to Appium
Creating an Appium framework
Automating the Android calculator
Running the tests through Maven
Starting and stopping Appium with Maven
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜