Selenium Essentials
eBook - ePub

Selenium Essentials

Prashanth Sams

Share book
  1. 194 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Selenium Essentials

Prashanth Sams

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Selenium Essentials an online PDF/ePUB?
Yes, you can access Selenium Essentials by Prashanth Sams in PDF and/or ePUB format, as well as other popular books in Informatica & Programmazione web. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784394332

Selenium Essentials


Table of Contents

Selenium Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. The Selenium IDE
WebDriver playback
Prerequisites for the WebDriver playback feature
Locator prioritization
Avoiding Selenium export
The Selenium IDE clipboard
Data Driven tests
User-defined JavaScript methods
Selenium IDE JavaScript functions
Simple JavaScript execution
Mouse scroll
Parameterization using arrays
Selenium Builder
Recording and playback
Data Driven tests
Testing using a JSON file
Testing using an XML file
Selenium Builder on the cloud
Summary
2. Selenium WebDriver Cross-browser Tests
Selenium WebDriver compatibility tests
TestNG
Selenium cross-browser tests on the cloud
SauceLabs
BrowserStack
TestingBot
Selenium headless browser testing
PhantomJS
HTMLUnitDriver
Switching user agents
Firefox user agent
Chrome user agent
Tests on specific Firefox versions
Tests from the custom Firefox profile
Tests from the custom Chrome profile
Summary
3. Selenium WebDriver Functions
Basic WebDriver functions
Locating WebElements
WebElement functions
Navigation
Cookies
Window functions
Select functions
Handling alerts and pop-ups
Mouse and keyboard actions
Summary
4. Selenium WebDriver Best Practices
Handling Ajax websites
The isElementPresent method
Waits
Explicit wait
The FluentWait method
Sleeper
Timeouts
The PageObject pattern
The PageFactory class
The @FindBy annotation
The @FindBys annotation
The EventFiringWebDriver class
Event-firing WebDriver example
Handling iframes
Handling native OS and browser pop-ups using Java Robot
Downloading browser pop-ups
Screen capture
Firefox profile to download files
The JavascriptExecutor class
Page scroll
Highlighting elements
Opening a new browser window
JavaScript error collector
Summary
5. Selenium WebDriver Frameworks
Behaviour-Driven Development
Cucumber BDD framework
Cucumber JVM
JBehave BDD framework
JXL API Data-Driven framework
Reading and writing in an Excel sheet
Simple Data-Driven approach
Data-Driven testing using reusable library
Data-Driven testing using TestNG with the @dataProvider annotation
Apache POI Data-Driven framework
HSSF usermodel ā€“ Binary workbook
XSSF usermodel ā€“ SpreadsheetML workbook (.xlsx)
SS usermodel ā€“ Binary and SpreadsheetML workbooks
Text file Data-Driven framework
Data-Driven testing using TestNG with the @dataProvider annotation ā€“ text file
Properties file Data-Driven framework
Data-Driven testing using TestNG with @dataProvider annotation ā€“ properties file
CSV file Data-Driven framework
Keyword-Driven framework
Hybrid-Driven framework
Summary
Index

Selenium Essentials

Copyright Ā© 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2015
Production reference: 1230315
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-433-2
www.packtpub.com

Credits

Author
Prashanth Sams
Reviewer
Alen Å iljak
Commissioning Editor
Pramila Balan
Acquisition Editor
Llewellyn Rozario
Content Development Editor
Sweny Sukumaran
Technical Editor
Parag Topre
Copy Editor
Sarang Chari
Project Coordinator
Rashi Khivansara
Proofreaders
Safis Editing
Maria Gould
Indexer
Hemangini Bari
Production Coordinator
Melwyn D'sa
Cover Work
Melwyn D'sa

About the Author

Prashanth Sams is a test automation engineer contributing to the IT industry since 2011. He graduated with a bachelor's degree in information technology from Anna University and lives in Chennai, India, with his family. He started his career as a human resource executive. Later, he worked at an HR outsourcing (US recruiting) company that operates in Chennai.
He is very passionate about test automation and has chosen to be a professional software engineer. He is an active blogger and a moderator for http://seleniumworks.blogspot.in/, a blog about Selenium, and is a great supporter of the Selenium Community, responding diligently to questions and answers over professional networks. He loves emerging technologies with soft skills development and spends 14 to 16 hours a day on them. In a short span of time, he has gained rich experience in various projects, handling different automation tools. Prashanth's Twitter handle is @prashanthsams.

About the Reviewer

Alen Å iljak is a solutions architect and software development enthusiast who was lucky enough to live through the times from the 8-bit machines to the 64-bit ones. As a fan of Agile methodologies, he appreciates creativity and enjoys creating order from entropy. Currently, he is happy to see software become mainstream, but he still sighs for the times when technologies were obsolete in a matter of months, if not weeks. Also, he stil...

Table of contents