Selenium with Python - A Beginner s Guide
58 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Selenium with Python - A Beginner's Guide , livre ebook

-

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
58 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

Step by step directions to get started with Selenium using Python as a programming languageKey features Get introduced to the world of Selenium Understand the concept of locators in Selenium Learn how to write scripts using Selenium WebDriver in Python Learn the concepts of synchronization Learn how to handle different HTML elements like form, table, alert, frame, and dropdown Learn about design patterns like the page object model, data-driven tests, and adding assertionsDescriptionSelenium is the most popular open source test automation tool available in the market. In the last decade, its usage has dramatically increased in the IT sector across all types of organizations. The reason for its popularity is mainly because it supports multiple programming languages, test executions on multiple browsers and operating systems. In this book, we will learn about the different components of Selenium. We will discuss the concepts of WebDriver and learn how to apply test automation concepts with it to automate the testing of our application. We will learn the process of recognizing the test objects on the screen and writing Selenium commands using Python as a programming languageWe will also discuss how to use design patterns like the page object mode and data-driven testing to ensure building a robust test framework, which is modular and scalable in nature. What will you learnThe objective is to introduce the world of Selenium to a manual tester who knows Python as a programming language. You will learn to demystify the concept of identifying test objects and writing Selenium commands to create robust test scripts. This book will help learn to automate different HTML elements, which we come across in the web applications we need to test. You will understand how to build a good test suite by learning the concept of design patterns like the page object model and data-driven tests to ensure maintainability of code. Who this book is for This book is for people who have experience in manual testing and knowledge in Python as a programming language. This book will also be helpful for a developer who knows Python as a programming language and is looking for test automation as a career option. Table of contents1. Selenium - Important Conceptual Background2. Selenium IDE3. Locators in Selenium4. Installation and Setup5. Selenium WebDriver6. Unit Test Creation n Python7. Synchronizing Tests8. Parameterization of Tests9. Handling Different Web Elements10. Working with Frames11. Concept of the Page Object Model12. Implementing Selenium Grid About the authorPallavi has an overall professional experience of 14 years. She has worked in varied roles as a product/project manager in the presales team and marketing team for solutions on test automation tools.She holds two provisional patents along with other contributors for her work on building tool agnostic test automation framework solutions. Currently, she is acting as a test automation coach, writer, speakerand owner at 5 Elements Learning where she collaborates and works with test automation enthusiasts across the globe. As an avid learner, she likes to keep herself updated to the latest trends andTechnologies. She is a firm believer in a larger good and likes to live by example.She volunteers her time for the organization eVidyaloka where she acts as a centre administrator. She is a lifetime member for the Jabarkhet forest reserve and People for Animals.Her Website: http://5elementslearning.comHer LinkedIn Profile: https://www.linkedin.com/in/pallavirsharma/

Sujets

Informations

Publié par
Date de parution 04 novembre 2019
Nombre de lectures 1
EAN13 9789389328820
Langue English

Informations légales : prix de location à la page 0,0600€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

Selenium with Python A Beginner’s Guide
by
Pallavi R Sharma
FIRST EDITION 2019
Copyright © BPB Publications, India
ISBN: 978-93-89328-813
All Rights Reserved. No part of this publication may be reproduced or distributed in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication.
LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY
The information contained in this book is true to correct and the best of author’s & publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but cannot be held responsible for any loss or damage arising from any information in this book.
All trademarks referred to in the book are acknowledged as properties of their respective owners.
Distributors:
BPB PUBLICATIONS
20, Ansari Road, Darya Ganj
New Delhi-110002
Ph: 23254990/23254991
MICRO MEDIA
Shop No. 5, Mahendra Chambers,
150 DN Rd. Next to Capital Cinema,
V.T. (C.S.T.) Station, MUMBAI-400 001
Ph: 22078296/22078297
DECCAN AGENCIES
4-3-329, Bank Street,
Hyderabad-500195
Ph: 24756967/24756400
BPB BOOK CENTRE
376 Old Lajpat Rai Market,
Delhi-110006
Ph: 23861747
Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai
Dedicated to
My Parents
Dr. Neelaksh Sharma & Dr. Manju Sharma
and
My Kids
Neeal & Maisha
About the Author
Pallavi has an overall professional experience of 14 years. She has worked in varied roles as a product/project manager in the presales team and marketing team for solutions on test automation tools. She holds two provisional patents along with other contributors for her work on building tool agnostic test automation framework solutions.
Currently, she is acting as a test automation coach, writer, speaker and she works as a solopreneur. She collaborates and works with test automation enthusiasts across the globe. As an avid learner, she likes to keep herself updated to the latest trends and technologies.
She is a firm believer in larger good and likes to live by example. She volunteers her time for the organization eVidyaloka where she acts as a centre administrator. She is a lifetime member for the Jabarkhet forest reserve and People for Animals.
Reviewer
Afsana Atar is an expert software test professional, an Agile evangelist. She has over a decade’s experience in the IT industry working with companies like Google, IBM, Principal Financial Group and Children’s Hospital of Philadelphia. She is currently working with a financial trading and brokerage firm, Susquehanna International Group. She has managed several projects and ensured the delivery of critical projects which enabled customer success. She is also an international author with several books and publications on testing, test management and the tech industry in general. She extends her thought leadership to teams in a variety of domains from digital advertising, education & healthcare to the financial sector in banking, insurance & trading. She is a Certified Scrum Master (CSM), an Agile scrum practitioner and part of the scrum alliance community. She is also an international speaker and has been invited to an international conference in Brazil and the USA after great success of her book “Hands-On Test Management with JIRA”.
Acknowledgement
First and foremost, I would like to thank Mr Manish Jain from BPB Publications for giving me this opportunity to write the book. I would also like to thank Nrip, Priyanka and all the people associated with this book. The entire team was very helpful and forthcoming in solving queries and making a first-time writer feel comfortable.
I would like to thank Mr. Pankaj Goel, CEO at CresTech, to introduce me to the world of Software Test Automation, to hold my hand and help me walk the path. I would also like to thank Dr. Naren Ramakrishnan, Director at Discovery Analytics at Virginia Tech, who helped me hone my skills in open source programming languages and made me realize that a BTech degree is equivalent to having a driving license.
I would like to express my heartfelt gratitude to my beautiful sister, Mahak and my handsome husband Ravi, for their care, humour, support, love and belief in my abilities. You both could see me when I could not see myself. Thanks a lot, guys.
A special thanks to all the people who took my courses at Udemy, joined my batches or one-to-one sessions, or met me through some corporate programs. Thank you so much for giving me this opportunity to coach you and learn this wonderful tool Selenium along with you.
Finally, I would like to express my heartfelt gratitude to the entire Selenium community from its creators to people who maintain the tool to everyone involved. Cheers to each one of you! It’s a wonderful creation!
– Pallavi R Sharma
Preface
Selenium is a test automation tool for web application functional testing that has gained significant popularity in the last decade or so. The reason for its popularity is that it is open source, it supports scripting in different programming languages like Java, C#, Python, Ruby, Perl, and JavaScript. It automates different browsers on different operating systems. No other tool in the market comes with this rich feature set with zero license cost. Many organizations big or small have moved towards Selenium. Also due to adaptation of Agile practices, CI/CD pipeline automation is no longer an option but a necessity.
Selenium implementation using Java as a programming language is widely used. In recent years, a significant rise is seen in the implementation of Selenium with Python, as this language has gained popularity. In this book, we will learn about the concepts of test automation using the tool Selenium, and implement them using the programming language Python.
Chapter 1 – In this chapter, introduces Selenium, the different components of Selenium, discusses why we should use Selenium and the Selenium architecture.
Chapter 2 – In this chapter, discusses the Selenium IDE, its installation, how to create the first test for record and playback. It covers Selenium commands.
Chapter 3 – In this chapter, talks about the concepts of the locators. Locators of Selenium allow us to identify the objects uniquely on the page so that we can perform actions on it.
Chapter 4 – In this chapter, covers the setting system for writing our very first test using selenium webdriver on the eclipse IDE, using the PyDev plugin. It runsa test on Chrome, Firefox and the Internet Explorer browser.
Chapter 5 – In this chapter, discusses the WebDriver, WebElements, and By classes of the selenium webdriver module of Python. It covers the different methods associated with these classes.
Chapter 6 – In this chapter, discusses the unittest module. It is the unit test framework of the Python programming language. It also discusses its assertion module to help us assert our scripts.
Chapter 7 – In this chapter, discuss the concept of synchronization. It covers static wait and dynamic wait.
Chapter 8 – In this chapter, explains how we can parameterize our test using an external dataset like a csv file.
Chapter 9 – In this chapter, discusses how Selenium automates different HTML elements. Form elements, tables, drop down.
Chapter 10 – In this chapter, looks at some other HTML elements like frame, alerts and action class of Selenium
Chapter 11 – In this chapter, discusses the concept of the page object model, which is a famous design pattern for Selenium test suite creations, which help manage object information.
Chapter 12 – In this chapter, discusses how to implement the Selenium grid by invoking the Selenium server in the hub mode and node mode. It also covers how to make some changes in scripts to point it to the hub for execution.
Downloading the code bundle and coloured images:
Please follow the link to download the Code Bundle and the Coloured Images of the book:
http://rebrand.ly/09afb
Errata
We take immense pride in our work at BPB Publications and follow best practices to ensure the accuracy of our content to provide with an indulging reading experience to our subscribers. Our readers are our mirrors, and we use their inputs to reflect and improve upon human errors if any, occurred during the publishing processes involved. To let us maintain the quality and help us reach out to any readers who might be having difficulties due to any unforeseen errors, please write to us at :
errata@bpbonline.com
Your support, suggestions and feedbacks are highly appreciated by the BPB Publications’ Family.
Table of Contents
1. Introduction to Selenium
Structure
Objective
History of Selenium
Benefits of Selenium
Components of Selenium
Architecture of Selenium
Conclusion
Questions
2. Selenium IDE
Structure
Objective
Installation of Selenium IDE
Introduction to demo web application
Record and playback in Selenium IDE
Structure of Selenium IDE Test
Conclusion
Questions
3. Locators in Selenium
Introduction
Structure
Objective
What is a locator?
Conclusion
Questions
4. Installation and setup
Structure
Objective
Installation and setting up
Installing Selenium Python module
Creating Python project in Eclipse
Automating Chrome browser
Writing the first script
Automating Firefox browser
Automating Internet Explorer
Conclusion
Questions
5. Understanding WebDriver, WebElement and By
Structure
Objective
Introduction to Selenium module
WebDriver
WebElement
By
Conclusion
Questions
6. Unittest in Python
Structure
Objective
The unitest and its structure
Assertions
Conclusion
Questions
7. Synchronizing Test
Structure
Objective
Synchronization
Implicit wait
Explicit

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents