100% found this document useful (15 votes)
41 views

Instant Access to Python Testing with Selenium: Learn to Implement Different Testing Techniques Using the Selenium WebDriver Sujay Raghavendra ebook Full Chapters

Learn

Uploaded by

caayabravi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (15 votes)
41 views

Instant Access to Python Testing with Selenium: Learn to Implement Different Testing Techniques Using the Selenium WebDriver Sujay Raghavendra ebook Full Chapters

Learn

Uploaded by

caayabravi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Python Testing with Selenium: Learn to Implement


Different Testing Techniques Using the Selenium
WebDriver Sujay Raghavendra

https://textbookfull.com/product/python-testing-with-
selenium-learn-to-implement-different-testing-techniques-
using-the-selenium-webdriver-sujay-raghavendra/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Selenium WebDriver Recipes in C#: Practical Testing


Solutions for Selenium WebDriver 3rd Edition Courtney Zhan

https://textbookfull.com/product/selenium-webdriver-recipes-in-c-
practical-testing-solutions-for-selenium-webdriver-3rd-edition-
courtney-zhan/
textboxfull.com

Selenium Essentials : get to grips with automated web


testing with the amazing power of Selenium WebDriver First
Edition Sams
https://textbookfull.com/product/selenium-essentials-get-to-grips-
with-automated-web-testing-with-the-amazing-power-of-selenium-
webdriver-first-edition-sams/
textboxfull.com

Test Driven Development with Python Obey the Testing Goat


Using Django Selenium and JavaScript 2nd Edition Harry J.
W. Percival
https://textbookfull.com/product/test-driven-development-with-python-
obey-the-testing-goat-using-django-selenium-and-javascript-2nd-
edition-harry-j-w-percival/
textboxfull.com

Python Testing Cookbook Easy solutions to test your Python


projects using test driven development and Selenium 2nd
Edition Greg L. Turnquist & Bhaskar N. Das
https://textbookfull.com/product/python-testing-cookbook-easy-
solutions-to-test-your-python-projects-using-test-driven-development-
and-selenium-2nd-edition-greg-l-turnquist-bhaskar-n-das/
textboxfull.com
Testing Java Microservices Using Arquillian Hoverfly
AssertJ JUnit Selenium and Mockito 1st Edition Andy
Gumbrecht
https://textbookfull.com/product/testing-java-microservices-using-
arquillian-hoverfly-assertj-junit-selenium-and-mockito-1st-edition-
andy-gumbrecht/
textboxfull.com

Ultimate Selenium WebDriver for Test Automation 1st


Edition Robin Gupta

https://textbookfull.com/product/ultimate-selenium-webdriver-for-test-
automation-1st-edition-robin-gupta/

textboxfull.com

Selenium Fundamentals Speed up your internal testing by


automating user interaction with browsers and web
applications 1st Edition Diego Molina
https://textbookfull.com/product/selenium-fundamentals-speed-up-your-
internal-testing-by-automating-user-interaction-with-browsers-and-web-
applications-1st-edition-diego-molina/
textboxfull.com

Introduction to Responsible AI: Implement Ethical AI Using


Python 1st Edition Manure

https://textbookfull.com/product/introduction-to-responsible-ai-
implement-ethical-ai-using-python-1st-edition-manure/

textboxfull.com

Domain-Driven Laravel: Learn to Implement Domain-Driven


Design Using Laravel Jesse Griffin

https://textbookfull.com/product/domain-driven-laravel-learn-to-
implement-domain-driven-design-using-laravel-jesse-griffin/

textboxfull.com
Python Testing
with Selenium
Learn to Implement Different
Testing Techniques Using the
Selenium WebDriver

Sujay Raghavendra
Python Testing
with Selenium
Learn to Implement Different
Testing Techniques Using the
Selenium WebDriver

Sujay Raghavendra
Python Testing with Selenium
Sujay Raghavendra
Dharwad, Karnataka, India

ISBN-13 (pbk): 978-1-4842-6248-1 ISBN-13 (electronic): 978-1-4842-6249-8


https://doi.org/10.1007/978-1-4842-6249-8

Copyright © 2021 by Sujay Raghavendra


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: James Markham
Coordinating Editor: Aditee Mirashi
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole
member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc
is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint, paperback,
or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-6248-1. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
To my Baba
Late Raghavendra A S
Table of Contents
About the Author�����������������������������������������������������������������������������������������������������xv

About the Technical Reviewer�������������������������������������������������������������������������������xvii


Acknowledgments��������������������������������������������������������������������������������������������������xix

Introduction������������������������������������������������������������������������������������������������������������xxi

Chapter 1: Introduction to Selenium������������������������������������������������������������������������� 1


What Is Selenium?������������������������������������������������������������������������������������������������������������������������ 1
Selenium Tools and Versions��������������������������������������������������������������������������������������������������������� 1
Selenium RC (Remote Control)������������������������������������������������������������������������������������������������ 3
Selenium IDE��������������������������������������������������������������������������������������������������������������������������� 3
Selenium Grid�������������������������������������������������������������������������������������������������������������������������� 3
Selenium WebDriver���������������������������������������������������������������������������������������������������������������� 4
Selenium 2.0��������������������������������������������������������������������������������������������������������������������������� 4
Selenium 3.0��������������������������������������������������������������������������������������������������������������������������� 5
Selenium WebDriver Architecture������������������������������������������������������������������������������������������������� 5
Client Library��������������������������������������������������������������������������������������������������������������������������� 5
JSON Wire Protocol����������������������������������������������������������������������������������������������������������������� 6
Web Drivers����������������������������������������������������������������������������������������������������������������������������� 6
Web Browsers������������������������������������������������������������������������������������������������������������������������� 6
Why Selenium?����������������������������������������������������������������������������������������������������������������������������� 6
Open Source���������������������������������������������������������������������������������������������������������������������������� 7
Platforms��������������������������������������������������������������������������������������������������������������������������������� 7
Language Support������������������������������������������������������������������������������������������������������������������� 7
Browser����������������������������������������������������������������������������������������������������������������������������������� 7
Reuse��������������������������������������������������������������������������������������������������������������������������������������� 7
Easy Implementation��������������������������������������������������������������������������������������������������������������� 8

v
Table of Contents

Flexible������������������������������������������������������������������������������������������������������������������������������������ 8
Hardware Resources��������������������������������������������������������������������������������������������������������������� 8
Simulation������������������������������������������������������������������������������������������������������������������������������� 8
Other Testing Tools������������������������������������������������������������������������������������������������������������������ 8
Integrating Python with Selenium����������������������������������������������������������������������������������������������� 10
Summary������������������������������������������������������������������������������������������������������������������������������������ 14

Chapter 2: Getting Started�������������������������������������������������������������������������������������� 15


Installing Python������������������������������������������������������������������������������������������������������������������������� 15
Installing Selenium��������������������������������������������������������������������������������������������������������������������� 16
Installing Drivers������������������������������������������������������������������������������������������������������������������������� 16
Browser Commands�������������������������������������������������������������������������������������������������������������������� 17
Opening a Web Browser�������������������������������������������������������������������������������������������������������������� 17
Mozilla Firefox����������������������������������������������������������������������������������������������������������������������� 18
Google Chrome���������������������������������������������������������������������������������������������������������������������� 18
Microsoft Edge���������������������������������������������������������������������������������������������������������������������� 18
Internet Explorer�������������������������������������������������������������������������������������������������������������������� 18
Closing a Browser����������������������������������������������������������������������������������������������������������������� 19
Quit Browser�������������������������������������������������������������������������������������������������������������������������� 19
Opening a Web Page�������������������������������������������������������������������������������������������������������������� 20
Setting the Browser Size������������������������������������������������������������������������������������������������������� 21
Setting the Browser Position������������������������������������������������������������������������������������������������� 22
Setting the Size Using Coordinates��������������������������������������������������������������������������������������� 23
Getting the Browser Position������������������������������������������������������������������������������������������������� 23
Getting the Window Size�������������������������������������������������������������������������������������������������������� 24
Navigation Commands���������������������������������������������������������������������������������������������������������� 24
Running a Python Test Case�������������������������������������������������������������������������������������������������������� 26
Summary������������������������������������������������������������������������������������������������������������������������������������ 26

Chapter 3: Mouse and Keyboard Actions���������������������������������������������������������������� 27


Action Chains������������������������������������������������������������������������������������������������������������������������������ 27
Mouse����������������������������������������������������������������������������������������������������������������������������������������� 28
Click��������������������������������������������������������������������������������������������������������������������������������������� 28
vi
Table of Contents

Click and Hold������������������������������������������������������������������������������������������������������������������������ 28


Context Click�������������������������������������������������������������������������������������������������������������������������� 29
Double Click��������������������������������������������������������������������������������������������������������������������������� 29
Move to an Element��������������������������������������������������������������������������������������������������������������� 30
Move Offset��������������������������������������������������������������������������������������������������������������������������� 31
Drag and Drop����������������������������������������������������������������������������������������������������������������������� 32
Drag and Drop By������������������������������������������������������������������������������������������������������������������ 34
Release���������������������������������������������������������������������������������������������������������������������������������� 35
Keyboard Actions������������������������������������������������������������������������������������������������������������������������ 35
Key Down������������������������������������������������������������������������������������������������������������������������������ 36
Key Up����������������������������������������������������������������������������������������������������������������������������������� 36
Send Keys������������������������������������������������������������������������������������������������������������������������������ 36
Send Keys to Element������������������������������������������������������������������������������������������������������������ 37
Pause������������������������������������������������������������������������������������������������������������������������������������� 37
Reset������������������������������������������������������������������������������������������������������������������������������������� 37
Summary������������������������������������������������������������������������������������������������������������������������������������ 37

Chapter 4: Web Elements���������������������������������������������������������������������������������������� 39


Elements/Web Elements������������������������������������������������������������������������������������������������������������� 39
Web Locators������������������������������������������������������������������������������������������������������������������������������ 40
Locating Elements���������������������������������������������������������������������������������������������������������������������� 40
ID Locator������������������������������������������������������������������������������������������������������������������������������ 40
Name Locator������������������������������������������������������������������������������������������������������������������������ 41
XPath Locator������������������������������������������������������������������������������������������������������������������������ 43
CSS Selectors������������������������������������������������������������������������������������������������������������������������ 56
Link Locator��������������������������������������������������������������������������������������������������������������������������� 61
Partial Link Locator��������������������������������������������������������������������������������������������������������������� 62
Tag Name������������������������������������������������������������������������������������������������������������������������������� 63
Class Name���������������������������������������������������������������������������������������������������������������������������� 64
Locating Multiple Web Elements������������������������������������������������������������������������������������������� 65

vii
Table of Contents

Locator Issues����������������������������������������������������������������������������������������������������������������������������� 66
Attribute Change�������������������������������������������������������������������������������������������������������������������� 67
No Web Element�������������������������������������������������������������������������������������������������������������������� 67
Web Element Not Visible�������������������������������������������������������������������������������������������������������� 67
Test Case Mismatch�������������������������������������������������������������������������������������������������������������� 68
iframe Web Element�������������������������������������������������������������������������������������������������������������� 68
Summary������������������������������������������������������������������������������������������������������������������������������������ 68

Chapter 5: Navigation��������������������������������������������������������������������������������������������� 69
Hyperlinks����������������������������������������������������������������������������������������������������������������������������������� 69
Testing Hyperlinks����������������������������������������������������������������������������������������������������������������������� 70
Hyperlink by ID���������������������������������������������������������������������������������������������������������������������������� 71
Hyperlink by Text������������������������������������������������������������������������������������������������������������������������� 71
Hyperlink by Partial Link������������������������������������������������������������������������������������������������������������� 71
Hyperlink by XPath���������������������������������������������������������������������������������������������������������������������� 71
Nth Hyperlink������������������������������������������������������������������������������������������������������������������������������ 71
Return All Hyperlinks������������������������������������������������������������������������������������������������������������������ 72
Check for a Valid Hyperlink��������������������������������������������������������������������������������������������������������� 72
Check for Broken Images������������������������������������������������������������������������������������������������������������ 73
Data Attributes Hyperlink������������������������������������������������������������������������������������������������������������ 74
Summary������������������������������������������������������������������������������������������������������������������������������������ 74

Chapter 6: Buttons�������������������������������������������������������������������������������������������������� 75
Default Button����������������������������������������������������������������������������������������������������������������������������� 75
Select������������������������������������������������������������������������������������������������������������������������������������ 76
Submit/Form Button�������������������������������������������������������������������������������������������������������������������� 78
Select by Visible Text������������������������������������������������������������������������������������������������������������� 79
Image as a Button����������������������������������������������������������������������������������������������������������������������� 79
Assert for Button������������������������������������������������������������������������������������������������������������������� 80
Radio Buttons������������������������������������������������������������������������������������������������������������������������������ 81
Select Radio Buttons������������������������������������������������������������������������������������������������������������� 82
Unselect/Clear Selection������������������������������������������������������������������������������������������������������� 83

viii
Table of Contents

Assert for Radio Button��������������������������������������������������������������������������������������������������������� 84


Checkbox������������������������������������������������������������������������������������������������������������������������������������ 85
Select/Check������������������������������������������������������������������������������������������������������������������������� 86
Assert If Checkbox����������������������������������������������������������������������������������������������������������������� 87
Assert Checkbox If Checked or Not��������������������������������������������������������������������������������������� 87
Clear/Unselect/Deselect Checkbox���������������������������������������������������������������������������������������� 87
Select List����������������������������������������������������������������������������������������������������������������������������������� 88
Getting All the Options����������������������������������������������������������������������������������������������������������� 90
Select������������������������������������������������������������������������������������������������������������������������������������ 90
Unselect/Clear/Deselect�������������������������������������������������������������������������������������������������������� 92
Deselect/Clear One Selected������������������������������������������������������������������������������������������������� 92
Deselect by Visible Text��������������������������������������������������������������������������������������������������������� 92
Deselect by Value������������������������������������������������������������������������������������������������������������������ 92
Deselect by Index������������������������������������������������������������������������������������������������������������������ 93
Multiple Select List��������������������������������������������������������������������������������������������������������������������� 93
Verify������������������������������������������������������������������������������������������������������������������������������������� 94
Deselect/Clear All Selected��������������������������������������������������������������������������������������������������� 95
Summary������������������������������������������������������������������������������������������������������������������������������������ 96

Chapter 7: Frames and Textboxes�������������������������������������������������������������������������� 97


Iframe������������������������������������������������������������������������������������������������������������������������������������������ 97
Switching to Iframe��������������������������������������������������������������������������������������������������������������������� 99
Switching Using ID���������������������������������������������������������������������������������������������������������������� 99
Switching Using Name���������������������������������������������������������������������������������������������������������� 99
Switching Using Index����������������������������������������������������������������������������������������������������������� 99
Switching as an Element����������������������������������������������������������������������������������������������������� 101
Switching to a Main Iframe������������������������������������������������������������������������������������������������������� 102
Default Content�������������������������������������������������������������������������������������������������������������������� 102
Parent Frame����������������������������������������������������������������������������������������������������������������������� 102
Frames with Waits�������������������������������������������������������������������������������������������������������������������� 102
Textboxes���������������������������������������������������������������������������������������������������������������������������������� 103
Single-line Textbox�������������������������������������������������������������������������������������������������������������� 103

ix
Table of Contents

Multiline Textbox������������������������������������������������������������������������������������������������������������������ 104


Inserting Values������������������������������������������������������������������������������������������������������������������� 105
Getting Values from Textbox and Textarea��������������������������������������������������������������������������� 105
Summary���������������������������������������������������������������������������������������������������������������������������������� 106

Chapter 8: Assertions������������������������������������������������������������������������������������������� 107


The Need for Assertion�������������������������������������������������������������������������������������������������������������� 107
Basic Asserts���������������������������������������������������������������������������������������������������������������������������� 108
assertTrue���������������������������������������������������������������������������������������������������������������������������� 108
assertFalse�������������������������������������������������������������������������������������������������������������������������� 108
assertIs�������������������������������������������������������������������������������������������������������������������������������� 109
assertIsNot�������������������������������������������������������������������������������������������������������������������������� 109
assertIsNone������������������������������������������������������������������������������������������������������������������������ 109
assertIsNotNone������������������������������������������������������������������������������������������������������������������ 110
assertIsInstance������������������������������������������������������������������������������������������������������������������ 110
assertNotIsInstance������������������������������������������������������������������������������������������������������������� 110
Compare Assert������������������������������������������������������������������������������������������������������������������������� 110
assertEqual�������������������������������������������������������������������������������������������������������������������������� 111
assertNotEqual�������������������������������������������������������������������������������������������������������������������� 111
assertGreater����������������������������������������������������������������������������������������������������������������������� 112
assertGreaterEqual�������������������������������������������������������������������������������������������������������������� 112
assertLess��������������������������������������������������������������������������������������������������������������������������� 112
assertLessEqual������������������������������������������������������������������������������������������������������������������ 112
Collection Assert����������������������������������������������������������������������������������������������������������������������� 113
Lists������������������������������������������������������������������������������������������������������������������������������������� 113
Tuples���������������������������������������������������������������������������������������������������������������������������������� 113
Sets������������������������������������������������������������������������������������������������������������������������������������� 114
Dictionary���������������������������������������������������������������������������������������������������������������������������� 114
assertIn�������������������������������������������������������������������������������������������������������������������������������� 115
assertNotIn�������������������������������������������������������������������������������������������������������������������������� 115
Summary���������������������������������������������������������������������������������������������������������������������������������� 116

x
Table of Contents

Chapter 9: Exceptions������������������������������������������������������������������������������������������� 117


What Is an Exception?��������������������������������������������������������������������������������������������������������������� 117
Why Use Exceptions?���������������������������������������������������������������������������������������������������������������� 117
Exceptions in Selenium������������������������������������������������������������������������������������������������������������� 118
ConnectionClosedException������������������������������������������������������������������������������������������������ 118
ElementClickInterceptedException�������������������������������������������������������������������������������������� 118
ElementNotInteractableException��������������������������������������������������������������������������������������� 118
ElementNotSelectableException������������������������������������������������������������������������������������������ 118
ElementNotVisibleException������������������������������������������������������������������������������������������������ 118
ErrorInResponseException�������������������������������������������������������������������������������������������������� 119
ErrorHandler.UnknownServerException������������������������������������������������������������������������������ 119
ImeActivationFailedException��������������������������������������������������������������������������������������������� 119
ImeNotAvailableException��������������������������������������������������������������������������������������������������� 119
InsecureCertificateException����������������������������������������������������������������������������������������������� 119
InvalidArgumentException��������������������������������������������������������������������������������������������������� 120
InvalidCookieDomainException������������������������������������������������������������������������������������������� 120
InvalidCoordinateException������������������������������������������������������������������������������������������������� 120
InvalidElementStateException��������������������������������������������������������������������������������������������� 120
InvalidSelectorException����������������������������������������������������������������������������������������������������� 120
InvalidSessionIdException��������������������������������������������������������������������������������������������������� 120
InvalidSwitchToTargetException������������������������������������������������������������������������������������������ 121
JavascriptException������������������������������������������������������������������������������������������������������������ 121
JsonException��������������������������������������������������������������������������������������������������������������������� 121
MoveTargetOutOfBoundsException������������������������������������������������������������������������������������� 121
NoAlertPresentException����������������������������������������������������������������������������������������������������� 121
NoSuchAttributeException��������������������������������������������������������������������������������������������������� 121
NoSuchCookieException������������������������������������������������������������������������������������������������������ 122
NoSuchElementException��������������������������������������������������������������������������������������������������� 122
NoSuchFrameException������������������������������������������������������������������������������������������������������ 122
NoSuchWindowException���������������������������������������������������������������������������������������������������� 122
NoSuchContextException���������������������������������������������������������������������������������������������������� 123

xi
Table of Contents

ScreenshotException����������������������������������������������������������������������������������������������������������� 123
StaleElementReferenceException��������������������������������������������������������������������������������������� 123
TimeoutException���������������������������������������������������������������������������������������������������������������� 123
UnableToSetCookieException���������������������������������������������������������������������������������������������� 123
UnexpectedAlertPresentException�������������������������������������������������������������������������������������� 123
UnexpectedTagNameException������������������������������������������������������������������������������������������� 124
UnknownMethodException�������������������������������������������������������������������������������������������������� 124
WebDriverException������������������������������������������������������������������������������������������������������������ 124
Exception Handling������������������������������������������������������������������������������������������������������������������� 124
Timeout Exception��������������������������������������������������������������������������������������������������������������� 125
Element Not Found�������������������������������������������������������������������������������������������������������������� 125
Stale Element���������������������������������������������������������������������������������������������������������������������� 126
Summary���������������������������������������������������������������������������������������������������������������������������������� 127

Chapter 10: Waits������������������������������������������������������������������������������������������������� 129


Why the Need for Waits?����������������������������������������������������������������������������������������������������������� 130
Types of Waits��������������������������������������������������������������������������������������������������������������������������� 130
Implicit��������������������������������������������������������������������������������������������������������������������������������� 131
Explicit��������������������������������������������������������������������������������������������������������������������������������� 132
Commonly Used ExpectedConditions in the Python Class�������������������������������������������������������� 134
Differences Between Implicit and Explicit�������������������������������������������������������������������������������� 139
Fluent���������������������������������������������������������������������������������������������������������������������������������� 140
Summary���������������������������������������������������������������������������������������������������������������������������������� 142

Chapter 11: Page Objects������������������������������������������������������������������������������������� 143


Page Objects Overview������������������������������������������������������������������������������������������������������������� 143
Page Object Model (POM) Overview������������������������������������������������������������������������������������������ 144
The Need for the Page Objects Model��������������������������������������������������������������������������������������� 144
Creating Page Objects��������������������������������������������������������������������������������������������������������������� 145
Test.py��������������������������������������������������������������������������������������������������������������������������������� 145
Page.py�������������������������������������������������������������������������������������������������������������������������������� 146

xii
Table of Contents

Elements.py������������������������������������������������������������������������������������������������������������������������� 147
Locators.py�������������������������������������������������������������������������������������������������������������������������� 148
Advantages of Page Objects Model������������������������������������������������������������������������������������������ 149
Limitations of the Page Object Model��������������������������������������������������������������������������������������� 150
Summary���������������������������������������������������������������������������������������������������������������������������������� 150

Chapter 12: Using Test Cases with a Screenshot������������������������������������������������� 151


Test Outcomes�������������������������������������������������������������������������������������������������������������������������� 151
Pass/OK������������������������������������������������������������������������������������������������������������������������������� 151
Fail��������������������������������������������������������������������������������������������������������������������������������������� 152
Error������������������������������������������������������������������������������������������������������������������������������������� 152
Test Case 1: Taking a Screenshot���������������������������������������������������������������������������������������������� 152
save_screenshot (‘name_of_file’)��������������������������������������������������������������������������������������� 152
get_screenshot_as_file (‘name_of_file’)���������������������������������������������������������������������������� 153
get_screenshot_as_png( )��������������������������������������������������������������������������������������������������� 153
Testing Frameworks������������������������������������������������������������������������������������������������������������������ 154
The Unittest Framework������������������������������������������������������������������������������������������������������ 155
Test Case 2: Unittest����������������������������������������������������������������������������������������������������������������� 156
setUp( )��������������������������������������������������������������������������������������������������������������������������������� 156
tearDown( )�������������������������������������������������������������������������������������������������������������������������� 157
setUpClass��������������������������������������������������������������������������������������������������������������������������� 158
tearDownClass�������������������������������������������������������������������������������������������������������������������� 158
setUpModuleandtearDownModule�������������������������������������������������������������������������������������� 159
Test Execution Order����������������������������������������������������������������������������������������������������������������� 161
Testing Tool Comparisons��������������������������������������������������������������������������������������������������������� 162
Summary���������������������������������������������������������������������������������������������������������������������������������� 163

Index��������������������������������������������������������������������������������������������������������������������� 165

xiii
About the Author
Sujay Raghavendra works primarily in data science,
machine/deep learning, and artificial intelligence.
He is currently the Executive Director of Raghavendra
Training & Consultancy (RTC), a startup company based
in Dharwad, Karnataka, India. He co-founded RTC with
Sumedh Raghavendra, his brother, in 2014. He plans and
evaluates new technology projects in research and product
development. His projects include analyzing a pap smear
filter for microscopic medical images, thermal heat sensing
in hospitals, OCR for handwritten characters, satellite
image analysis, and network automation for maps, forecasting models, text analytics,
predictions, and more.
Raghavendra is also a consultant on building research centers for technical
universities and colleges. His recent interests include automating test cases through
machine learning. He has published numerous research articles in international journals
and has been on reviewer committees for various journals and conferences.

xv
About the Technical Reviewer
Supreeth Chandrashekhar is a seasoned software
technology professional associated with Philips Healthcare,
Bangalore. He has more than eight years of architect
experience in building/running highly robust, massively
scalable, and extremely secure systems, as well as setting
up and managing mid-sized tech teams. He is extremely
passionate about building great products that exceed
customer expectations.

xvii
Acknowledgments
The person behind who I am today is my mother, Mrs. Indumati Raghavendra.

xix
Introduction
This book focuses on how to implement testing techniques using Selenium WebDriver
with the Python programming language. This quick reference provides simple,
functional test cases with a syntax-based approach for Selenium WebDriver.
You’ll begin by reviewing the basics of Selenium WebDriver and its architectural
design history. Next, you move on to the configuration and installation of the Selenium
library in various web browsers, including the basic commands needed to start test
scripts. You’ll review keyboard and mouse action commands for testing user interactions
on a web page and see how hyperlinks are tested.
The book examines various web elements using the eight different locators provided
by Selenium to help you choose the one best suited to your needs. All Python scripts are
real ready-to-test examples that are explained thoroughly in problem statements. You’ll
use different Python design patterns to automate test scripts that can be incorporated
with Selenium.
Python Testing with Selenium teaches the expertise to write your own test cases.

xxi
CHAPTER 1

Introduction to Selenium
Before Selenium, testing the functionality of a web application was done manually,
which took many hours. The testing tended to rely on different scenarios. Each
scenario was considered a test case to enact the behavior of the web app before its
implementation. These test cases were deployed on various browsers to affirm any
issues in the source code.
It requires a dedicated team of testers to check all test cases. Accuracy and time are
major constraints in web development, which has led to automated test cases that can
be used in different web applications without changing the source code. Selenium was
developed to automate test cases.
This first chapter of the book offers a complete overview of Selenium and its core
architectural design. The subtopics explain using Selenium and compares it to other
testing tools in the domain. Later in the chapter, integrating Python with Selenium is
explained. Let’s start with a brief history and description of the Selenium tool and the
reasons to use it.

What Is Selenium?
Selenium came into existence in 2004 at ThoughtWorks to test a web application named
Time and Expenses by Jason Huggins. The tool was developed to test the front-end
behavior of an application in various browsers. The tool was popular and open source.
The increase in demand for automated testing led to the development of several versions
of Selenium over the years, which are discussed next.

Selenium Tools and Versions


ThoughtWorks has released four major versions of Selenium to test web applications.
Figure 1-1 shows each version and its release year.

1
© Sujay Raghavendra 2021
S. Raghavendra, Python Testing with Selenium, https://doi.org/10.1007/978-1-4842-6249-8_1
Chapter 1 Introduction to Selenium

6HOHQLXP
7RROV

6HOHQLXP 6HOHQLXP 6HOHQLXP 6HOHQLXP


5&  ,'(  :HE'ULYHU *ULG 

6HOHQLXP
 

6HOHQLXP
 

Figure 1-1. Selenium suite

Any one (or more) of these Selenium tools can be used by an organization; the
choice depends on the test environment’s requirements. The first tool developed by
ThoughtWorks was Selenium Core in 2004. It allowed the tester to write their own code/
script to automate front-end interactions like keyboard or mouse activities. These
activities were similar to a user interacting with the application.
In web application security, there is a policy that grants a test script permission to
access data in web pages from the same origin; this policy is called a same-host policy.
A same-host policy only allows a test case to access pages within the same domain. For
example, a test script can access multiple pages within www.apress.com, such as www.
apress.com/in/python and www.apress.com/in/about, because of the same-host
policy; however, this policy does not allow access to pages from different sites, such as
https://google.com or https://wikipedia.org.
Due to the same-host policy, access to code elements is denied or blocked when
using external scripts. To avoid this complication, Huggins and Paul Hammant
developed a server component that enables you to test a web app with a test script that
makes the browser believe that both are from the same source. This core Selenium was
eventually known as Driven Selenium or Selenium B.
2
Chapter 1 Introduction to Selenium

Selenium RC (Remote Control)


Selenium RC (remote control) was deployed by Dan Fabulich and Nelson Sproul in
2005 to enable a stand-alone server using an HTTP proxy. This solved the issue faced
by Selenium Core with the same-host policy. Selenium RC was divided into two parts:
Selenium Remote Server and Remote Client. The time it took both the server and the
client to receive and send HTTP requests led to the slower execution of test cases; hence,
Selenium RC became the least-used tool.

Selenium IDE
In 2006, a completely integrated development environment (IDE) was developed by
Shinya Kasatani for testers. It was in the form of a plugin for Mozilla Firefox and Google
Chrome web browsers. Selenium IDE used functional tests in a live environment. The
feature of this IDE involved tests to record/replay and debug/edit, which was known as
Selenium Recorder. The recording scripts were stored in a test script called a Selenese
script in Selenium. The test scripts were written in languages like Java, Ruby, JavaScript,
and PHP. The IDE also provided data retrieval options for test cases performed for web
apps. Selenium IDE is currently actively maintained by Kantu and Katalon.

Selenium Grid
It was difficult to test web applications on the new technologically-enabled devices
that were emerging on the market. To solve this issue, in 2008, Philippe Hanrigou at
ThoughtWorks developed a grid architecture that allowed you to test apps on any
number of remote devices via a browser, which became Selenium Grid. It reduced the
time to test scripts on any number of remote devices because it was done in parallel.
The test command tests on remote devices via a browser. There are two components
necessary to execute a test script on a remote device: a hub/server and a node/remote
device.
The hub/server gets requests from the web driver client that allows access and routes
it to remote drivers. These drivers are registered on remote devices. A node/remote
device has a local OS and browser. The web driver is the part of a browser that performs
tests. When defining a script, you need to name a remote device, platform, browser, and
so forth, to locate a specific node, and then test scripts are executed for that node.

3
Chapter 1 Introduction to Selenium

S
 elenium WebDriver
Selenium WebDriver is a widely used tool. The advancement in Selenium RC resulted in
the development of Selenium WebDriver. The commands in WebDriver are accepted via
a client API and are sent to different browsers, such as Mozilla Firefox, Apple Safari, and
so forth. Almost all browsers support Selenium WebDriver. Each browser has a specific
driver associated with it, which are listed in Table 1-1.

Table 1-1. Web Browsers and Their


respective Selenium WebDriver

Web Browser Driver Name

Mozilla Firefox Firefox (i.e., Gecko)


Google Chrome Chrome
Apple Safari Safari
Opera Opera
Microsoft Internet Explorer Internet Explorer
Microsoft Edge Edge

Each driver listed in the table is maintained to support automation for its respective
browser. Another browser driver, HTMLUnitDriver, stimulates browsers using a headless
browser (HtmlUnit).
Selenium WebDriver allows you to start a web browser directly and manages it by
executing commands. To avoid security conflicts and issues, WebDriver uses native OS
functionality instead of browser-based JavaScript commands. The Selenium WebDriver
version of WebDriver focused on the interface. The later versions are Selenium 2.0 and
Selenium 3.0.

S
 elenium 2.0
In 2007, Simon Stewart at ThoughtWorks created Selenium 2.0, which enables
automation on almost all browsers. This version has fewer calls and allows testers/
developers to create their own domain-specific language (DSL). The Watir web driver,
which is implemented in Ruby, is one of the best examples of DSL.

4
Chapter 1 Introduction to Selenium

S
 elenium 3.0
Developers Simon Stewart and David Burns made a draft to standardize Selenium,
which was fully accepted and became a W3C standard protocol in 2019 when it became
known as Selenium 3.0.
This completes the overview of Selenium and its evolution through the years; now
let’s consider the Selenium architecture before diving into the test cases, which are
covered in the upcoming chapters of this book.

Selenium WebDriver Architecture


Now that you know about Selenium’s various tools and versions, let’s look at a tool that
helps automate test scripts for a web application. To automate a test script, there is an
interaction between the tool and browser that can only be understood by its architecture.
Selenium WebDriver is a tool in the Selenium suite that automates test cases for
any web application. The interactions between a web driver tool and the application
go through various stages. These stages form an architecture, as depicted in Figure 1-2.
The architecture of Selenium WebDriver consists of three main components: Selenium
client libraries, browser drivers, and web browsers. The communication among the
components is done through a JSON protocol.

&OLHQW/LEUDU\ -621 :HE%URZVHU :HE%URZVHUV


ƌŝǀĞƌƐ
3URWRFRO

Figure 1-2. Selenium WebDriver architecture

C
 lient Library
A client library is a package of languages supported by Selenium. The core languages
supported by Selenium are Python, Java, JavaScript, Ruby, and C# (https://selenium.
dev/downloads/). Languages like Perl, PHP, GO, DART, R, and Haskell are maintained
and developed by a third party (https://selenium.dev/thirdparty/). Selenium does
not officially support these third-party language bindings.

5
Chapter 1 Introduction to Selenium

JSON Wire Protocol


JSON is the acronym for JavaScript Object Notation, which is a lightweight protocol that
exchanges data or information from the client to the server and vice versa. JSON is in
an easy-to-understand text format, which enabled ThoughtWorks developers to use
the JSON wire protocol for communication between the client library and web browser
drivers. The server doesn’t bother the language used at the client side; it can only read
data from the protocol, which is received in JSON format. The JSON wire protocol
converts any data or information to JSON format before sending it to the server. It is a
REST API.

Note REST (representational state transfer) defines a set of guidelines to develop


an API (application programming interface). One of the rules is to get a server
response from the source when linked to a URL.

W
 eb Drivers
Each browser has a web driver associated with it (refer to Table 1-1 for more
information). These web drivers are responsible for executing the commands received
from the client library. The execution of these commands is done in a web browser,
which communicates via HTTP.

W
 eb Browsers
The commands received from an HTTP response from web drivers are executed. Like
a client library, core and third-party browsers may be used. The browsers supported by
Selenium are Firefox, Internet Explorer, Safari, Opera, Chrome, and Edge. These browsers
can be run on any operating system, such as Windows, macOS, or Linux. There are third-
party web drivers developed for these web browsers, but they are not recommended.

W
 hy Selenium?
Having examined the Selenium WebDriver architecture, let’s further enhance your
understanding of Selenium.
6
Chapter 1 Introduction to Selenium

Due to the availability of testing tools on the market, a question arises: Why use
Selenium for testing? There are several answers to this question, but the primary reason
to use Selenium is that it is open source (i.e., freely available to use). The benefits of
using Selenium as a testing tool are discussed next.

Open Source
Selenium is open source and can be used at no cost. There is a large community of
developers/testers who continuously maintain and support it. You can modify, integrate,
or extend Selenium for any testing environment because the code is open source.

Platforms
Selenium WebDriver is cross-platform, which means that it has the flexibility to
automate test cases in any operating system, such as Windows, macOS, Unix, and Linux.
These test cases written in one OS can be used in any other.

Language Support
Another reason that Selenium has a large community is that it supports multiple
programming languages and scripts, like Python, Java, Ruby, Perl, PHP, JavaScript,
Groovy, GO, DART, and so forth. This is supported by the Selenium WebDriver language
bindings/client library.

Browser
As with platform flexibility, Selenium WebDriver supports almost all browsers. Mozilla
Firefox, Google Chrome, Safari, Opera, Internet Explorer, and Edge are supported; they
are the most widely used around the globe.

Reuse
Once written, the test scripts can be used as needed across any browser or OS. There are
no restrictions on using a test script multiple times.

7
Chapter 1 Introduction to Selenium

E asy Implementation
The implementation of Selenium WebDriver depends on the environment and the script
used by the developer/tester or organization. This variety is due to the vast number of
potential OS and browser combinations. You can develop a customized web driver or
framework to implement in a specific testing environment.

F lexible
Refactoring or regrouping in a test script enables you to reduce the amount of code
duplication and other complications. Selenium provides developers/testers with this
flexibility in a test script.

H
 ardware Resources
Unlike other testing tools—like UFT, CompleteTest, Katalon Studio, and so forth—
Selenium requires fewer hardware resources.

S
 imulation
Selenium’s simulations create the real-time behavior of a mouse and keyboard. This
helps to test advanced events like drag, drop, click, hold, scroll, and so forth, with a
mouse and similar keypress events made on a keyboard.
The various reasons discussed so far should satisfy reasons to use Selenium as a
testing tool but comparing it with the other tools available ensures that Selenium is best
at automating tests. This is discussed next.

Other Testing Tools


Now that you know the benefits offered by Selenium, let’s now compare Selenium with
other testing tools available in the testing domain. This comparison shows precise
reasons to use Selenium with Python. The comparison is made on various features of the
testing tools. There are four other major testing tools available. Table 1-2 showcases each
of these testing tools.

8
Chapter 1 Introduction to Selenium

Table 1-2. Comparing Selenium to Other Testing Tools


Selenium Katalon UFT (Unified TestComplete Watir
Studio Functional
Testing)

Release Year 2004 2015 1998 1999 2008


Test Platform Cross Cross Windows Windows Cross
Test Web apps Web/mobile Windows/web/ Windows/web/ Web/mobile
Applications apps, API/web mobile apps, mobile apps, apps
services API/web API/web services
services
Language Python, Java, C#, Java/Groovy VBScript Python, Ruby
Support Perl, JavaScript, JavaScript,
Ruby, PHP VBScript, Jscript,
Delphi, C++, C#
Installation Easy to Easy Easy Easy Advanced
Process Intermediate
(depends on the
Selenium tool)
Programming Intermediate to Advanced Advanced Advanced Advanced
Skills Advanced (for
writing desired
test cases)
Cost Free Free Licensed with Licensed with Free
maintenance maintenance fees
fees
License Type Open source Freeware Proprietary Proprietary Open
(Apache2.0) source (MIT
License)
Product Open source Community/ Dedicated Dedicated staff/ Open
Support community business staff/ community source
support community community

9
Chapter 1 Introduction to Selenium

Now that you can see that Selenium is the best-suited automated tool for testing web
applications, let’s look at why Python is the best language to integrate with Selenium.

Integrating Python with Selenium


Now that Selenium WebDriver
has been discussed, you may want to know which language is used to automate test
scripts or cases. Selenium WebDriver supports a variety of languages. The following lists
the reasons why Python is the language best suited for testing.

• Python was developed within the scope of the English language, so


code syntaxes are easy to read.

• Python scripts are not machine-level code, which makes it easy to


code.

• Python offers cross-platform support, which has resulted in a large


community of followers.

• The installation of Python on Selenium WebDriver is easier than any


other language.

• Python supports the development of web and mobile applications.


Python developers can easily migrate to Selenium WebDriver to test
their applications because Selenium is supported in Python.

• Selenium provides the Python API that connects straight to the


browser. Since Python is less verbose, the Selenium commands are
easy to write and execute when connecting to any of the supported
browsers.

• The Python programming language is a script; therefore, there is no


need for a compiler to convert code from one form to another.

• There is immense library support for Python due to the large number
of communities behind it, who maintain and update it regularly.
Selenium WebDriver can be extended to build more advanced test
cases by automating as per the needs of the organization or individual.

• Python libraries also support different language bindings. This helps


to automate test cases for applications developed in other languages.
10
Chapter 1 Introduction to Selenium

Listings 1-1 through 1-5 present a simple program for the languages that are
supported by Selenium WebDriver. The program opens a browser, visits a specified URL,
and searches a query in it. The program first imports the necessary Selenium WebDriver
libraries. WebDriver then opens the Mozilla Firefox browser and specifies www.apress.
com as the URL to visit. Next, it locates the search bar element in the Apress site. After
locating the element, this book’s title, Python Testing with Selenium, is entered as a query
in the search bar and submitted. The submitted query provides a new web page with the
books associated with the query.
Listings 1-1 through 1-5 illustrate how easy Python is to implement test cases with
Selenium web driver when compared to other programming languages, such as Java, C#,
Ruby, and PHP.

Listing 1-1. Python Code

#Importing selenium libraries in python


from selenium import webdriver

#Opening web Firefox browser using webdriver


driver=webdriver.Firefox()

#Adding URL to open in browser


driver.get("http://www.apress.com")

#Finding Element of search bar


search=driver.find_element_by_name("query")

#Searching book name as string/query in search bar


search.send_keys("Python Testing with Selenium")

#Submit string to search bar


search.submit()

# Close Firefox browser


driver.quit()

Listing 1-2. Java Code


//Importing Libraries in JAVA
importorg.openqa.selenium.By;
importorg.openqa.selenium.WebDriver;

11
Chapter 1 Introduction to Selenium

importorg.openqa.selenium.WebElement;
importorg.openqa.selenium.firefox.FirefoxDriver;

public class Search {

public static void main(String[] args) {

        //Opening Firefox Browser


        WebDriver browser = new FirefoxDriver();

        //Opening Apress Website


        browser.get("http://www.apress.com");

        //Finding Element of search bar


        WebElement search =driver.findElement(By.name("query"));

        //Searching book name as query


        search.sendKeys("Python Testing with Selenium");

        //Submitting the query


        search.submit();

        //Closing browser
        browser.close();
}
}

Listing 1-3. C# Code

//Importing Libraries in C#
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;

class Apress
{
staticvoid Main()
{
    // Opening Browser
    WebDriver browser = newFirefoxDriver();

12
Another Random Scribd Document
with Unrelated Content
“June says you’ve had an offer for this house. Who made it, and
what’s he offered?”
Allen leaned forward to knock off the ash of his cigar on the tray
beside him.
“That’s what I wanted to see you about,” he said slowly. “Yes, I’ve
had an offer. It’s from a man named Spencer from Sacramento. Just
come down here to settle. He’s got a big family, and wants a good
sized house and garden for the kids to play in. Fashionable locality
doesn’t count for much with him. He’s offered twenty-five thousand
down for the place as it stands, furniture and all.”
There was a slight pause and the speaker added:
“It’s what decided me to go to Virginia, get rid of this—and—and—
get some ready money. I’m pretty close to the ragged edge, Jim.”
“I don’t see how it’s going to benefit you,” said the Colonel. “My
mortgage and the interest for two years back, paid in full, doesn’t
leave you much more than your fares to Virginia.”
Allen got up, walked a few steps away, then came back and stood by
the Colonel’s chair. His face was deeply flushed, but it had lost its
embarrassed air. He looked resolute and determined.
“Jim,” he said doggedly, “I’ve got to have that money.”
“Beau Allen,” said the Colonel in the same tone, “by what right do
you dare to say that to me?”
For a silent moment they eyed each other, then the elder man went
on:
“Twenty-five years ago you stole my sweetheart. Four years ago you
tried to steal my land and I gave it to you, because you had a wife
and two helpless children; and now you’re trying to steal my house.”
“I’ve got the same right as I had before,” said the other, “I’ve still got
two helpless children.”
“Am I to be robbed to provide for your children?”
“You’re using pretty strong words, Jim, but you’ve had provocation.
You’ve met bad usage at my hands and you’ve given back good.
Give it back once more, for the last time. Give it back for the sake of
my two girls. They’re as helpless now as they ever were, and God
knows I’m as unable to help them.”
“Why should I keep on providing for your children? You’re their
father, younger than I, and as able-bodied. Four years ago I put you
on your feet when I gave you the Parrish Tract. You’ve had your
chances, the best I could give you. I’m on the ragged edge too. I’m
sixty years old and I’ve had to apply for a position.”
“Listen to me, Jim,” with desperate urgence. “Let me have this
money till after Rosamund’s marriage. Let me have fifteen thousand
dollars of it. So help me God, I’ll invest the rest in your name in any
securities you mention. Don’t you see I’ve got to have money till after
that? I can’t let Harrower know we’re bust. You think he doesn’t care.
But I tell you he does. What’s going to happen to Rosamund if he
throws her over at the last moment?”
The Colonel was silent, looking at the ash tray from beneath down-
drawn, bushy brows. Allen close at his elbow continued with fevered
intensity:
“Rosamund’s wrapped up, body and soul, in that man. What’s she
going to do if he backs out? And you know him; you’ve seen the kind
he is, daft about his family and his ancient, honorable name. Even if
he doesn’t want money with her do you think he, with his ancestors’
portraits hanging on the walls, wants to marry a girl whose father’s a
busted mining speculator—in debt all round, who hasn’t got the
means to buy his daughter a decent dress to get married in? Look at
June! Are the futures of both my daughters going to be ruined
because I’m broke? Good God, Parrish, you care for them! You can’t
now, when you see what June’s been brought to, stand in the way of
Rosamund’s happiness.”
The Colonel sat looking at the ash tray for a frowning moment, then
he said:
“What have you done with the spring? If there had been no mineral
on the land the spring would have brought you an income for years.”
“I sold the land with the spring on it, after the Crown Point collapse.
Blake, the hotel man in San José, bought it, and is building a hotel
up there now. That’s the past. I’m not defending it, nor my life
between then and now. I’m talking of my children. Put me, and what I
am, out of the question. It’s my two girls that count just now.”
The Colonel rose, and walking to the fireplace, stood there with his
elbow on the mantel-piece, looking down at the small fire that glowed
in the grate. Allen by the table watched him with anxious, waiting
eyes.
“I’ve got chances in Virginia,” he said. “Living on the spot there’s a
different proposition from running back and forth like this. The
Maybough properties that I’m interested in are looking pretty
promising. Inside of a year, if they turn out as we expect, I may be
able to pay you the whole sum back.”
The Colonel gave a suppressed sound, short and scornful, but did
not raise his head. The other went on.
“Fifteen thousand will carry us to Virginia and over the wedding.
Harrower’s to be back in the spring and they’ll be married as soon as
he comes. Spencer wants the house in January or February. That
will just about fit in. We can go to Virginia as soon as the sale’s
completed and have everything ready and in shape by the time
Harrower gets here. And it will be better for June, too, better to get
her out of all this. She feels pretty bad, poor little girl! One of the
reasons that makes me so keen about selling the place and leaving
is to get her away from all this talk about Barclay and that Gracey
girl.”
The Colonel, without raising his eyes, said:
“You’ll want the whole twenty-five thousand.”
“No—no—” said Allen with undisguised eagerness, hope illuminating
his face, “fifteen will do, though of course twenty would be better.
Fifteen ought to carry us well along into the summer, and by that
time the Maybough should be paying. There’ll be the wedding and
the trousseau. Of course twenty would be better, but if you’ll let me
have the fifteen I can do it. I’ll invest the other ten any way you may
say and—”
He stopped as the Colonel turned from the fire with a short laugh.
“Sell the house,” he said, “and take it all.”
“What?—” Allen did not quite dare to believe it.
“Sell the house. See Spencer as soon as you can, and I’ll give you
satisfaction of the mortgage.”
“Jim!” the other ejaculated, and held out a shaking hand.
But the Colonel brushed by it and passed into the hall, where his hat
and coat hung. Allen followed him, trying to talk, but he stopped the
feeble words of gratitude. Standing under the hall lamp, the light
falling on his white hair, he said,
“There’s no thanks between you and me. If it wasn’t for your
daughters I’d see you standing on the corner begging for nickels and
not drop one in your tin cup. And you know it. You know, too, what I
feel about them, and why I feel it. You know I’d do it again if I had the
money. But I haven’t. There’s not much more to be got out of me.
You’ve about sucked me dry.”
The night was clear and he walked home, slowly and lingeringly by a
circuitous route of cross-streets. At first he paced onward in an
absorbed reverie, his eyes down, striking the cracks in the pavement
with the tip of his cane. Presently he looked up above the housetops,
at the widths of sky sown with great, calm stars. It was early night;
only the larger stars were visible. Once or twice as he walked on
looking up, he laughed, a short, dry laugh, at himself and the follies
he had committed.
When he reached his own room in the Traveler’s Hotel he found
Rion’s answer to his letter. Standing under the feeble light that fell
from the sitting-room chandelier he read it. It was short, for Rion was
but a poor correspondent. The position of assistant secretary of the
Cresta Plata would be vacant on January first. The Gracey boys
would be flattered if one of James Parrish’s reputation and position
would care to fill it. The salary would be five hundred dollars a
month.
The Colonel turned the letter over, eying it. The heaviness of his
spirit was lightened. Through the few lines he seemed to feel the
strong grip of the mining man’s hand, to meet the searching look of
his keen, honest eyes. They would all be together in Virginia—not
such a bad beginning for a new life at sixty.
END OF BOOK II
BOOK III
THE DESERT
CHAPTER I
NEVADA
The mountain wall of the Sierra bounds California on its eastern
side. It is a rampart, towering and impregnable, between the garden
and the desert. From its crest, brooded over by cloud, glittering with
crusted snows, the traveler can look over crag and precipice,
mounting files of pines and ravines swimming in unfathomable
shadow, to where, vast, pale, far-flung in its dreamy adolescence,
lies California, the garden. On the other side—gaunt, hostile, gray—
is Nevada, the desert.
In other lands nature and man have ended their struggle for
supremacy. Man has conquered and nature, after long years of
service, is glad to work for him, to quicken the seed he sows, to swell
the fruit on the branch, and ripen the heads of grain. She laps him
round with comfort, whispers her secrets to him, reveals herself in
sweet, sylvan intercourse. And he, cosily content, knows her as his
loving slave, no more rebellious, happy to serve.
But in Nevada, nature is still unconquered, savage and supreme. It is
the primordial world, with man a shivering stranger amid its grim
aloofness. When the voice of God went out into the darkness and
said, “Let there be light,” the startled life, cowering in caves and
beneath rocks, may have looked out on such a land—an unwatered
waste, treeless, flowerless, held in an immemorial silence.
Man as we know him has no place here. He is a speck moving
between the dome of sky and the floor of earth. Nature scorns him,
has watched him die and whitened his bones in a few blazing weeks.
The seed he plants withers in its kernel, the earth he turns up,
frosted with alkali, drops apart in livid flakes. The rare rivers by which
he pitches his tent are sucked into the soil, as though grudging him
the few drops with which he cools his burning throat. An outcast from
a later age he is an intruder here. These solemn wastes and eternal
hills have not yet learned to call him master.
When the pioneers trailed across it, Nevada was to them only “the
desert,” a place where the horrors of heat and thirst culminated.
They knew it as a sterile, gray expanse, breaking here and there into
parched bareness, and with lines of lilac-blue or reddish-purple hills
seeming to march with them as they moved. From high places they
saw it outspread like a map, its surface stippled with sage and the
long green ribbon of a tree-fringed river looping across its grim
aridity. At evening it took on limpid, gem-like colors. The hills turned
transparent sapphire and amethyst, the sky burned a thin, clear red.
An unbroken stillness lay upon it and struck chill on the hearts of the
little bands who, oppressed by its vast indifference, cowered beneath
its remote, unfamiliar stars.
As they passed across it they mined a little; here and there they
scraped the surface, clustered round a stream-bed for a day or two
and sent the water circling in their pans. But California, the land of
promise, was their goal. With the western sun in their eyes they
looked at the mountain wall and spoke of the Eldorado beyond
where the gold lay yellow in the sluice box, and flecked with glittering
flakes the prospector’s pan.
That was in forty-nine. Ten years later they were hurrying backward
over the mountains to the streams that drain Mount Davidson.
Nevada had its wealth too, a hidden, rock-ribbed wealth, jealously
buried. They tore it out, built a city of tents and shacks as they
delved, and in ten years more were gone again, dispersed over the
far West like the embers of a fire which a wind scatters.
Then once again the barren state drew them back. Deep in the roots
of Mount Davidson one of the greatest ore-bodies in the world lay
buried. This time they gathered in their might. Miner, engineer,
assayer, stock-jobber, manipulator, manager and millionaire poured
over the mountain wall, bringing in their train the birds of prey that
follow in the wake of the mining army. The city of tents and cabins
grew into a city of streets and buildings and spread, climbing the
mountain side in terraces. A railroad crawled perilously to it, looping
over the mountain flanks. In a cleared nook by a river the smoke of
its mills blackened the sky.
Isolated from the rest of the world, encircled by desolation, the town
seethed and boiled with an abnormal activity, a volcano of life in the
midst of a dead land. About it the desert brooded, pressing in upon
it, watching and waiting. To it the little city was an outside thing,
hostile, alien, unwelcome. It scorned the pigmy passions of its men
and women, had no sympathy with the extravagances of their money
madness. When they had been brushed away like an ant-hill by a
passing foot, it would sweep over their town, obliterate their traces,
reclaim its own. And once again the silence of a landscape where
there is neither ripple of water nor murmur of leaf would resettle in
crystal quietude.
Confined within their own walls, with no outlet for the pressure under
which they lived, the inhabitants of Virginia burned with a wild activity
and energy. The conditions of life were so unusual, so fiercely
stimulating to effort and achievement, that average human beings
were lifted from their places and became creatures of dauntless
initiative. They conquered the unconquerable, accomplished
triumphs of daring and ingenuity where under ordinary
circumstances they would have recoiled before insuperable
obstacles. They were outside themselves, larger for good or evil than
they had ever been before or would be again. Nature had dared
them to her vanquishing and they had risen to the challenge.
In the spring of 1874 the ferment incident to the opening of the great
ore-body that has gone down in history as the “Big Bonanza,” began
to bubble toward boiling point. Month by month stocks had steadily
risen, and month by month the huge treasure chamber, filled with
silver as a nut is with kernel, developed in ever-increasing richness.
The city was packed close as a hive with bees with twenty-five
thousand souls all quivering to the increasing momentum of the
excitement. The mines were a dynamo whence electric vibrations
spread into the world outside. The dwellers in huts among the sage
were shaken by them. They thrilled along the Pacific slope. In New
York and London men felt them and their pulses quickened. The
Bonanza times were nearly at the flood.
The city grew with astonishing rapidity, breathlessly climbed the side
of Mount Davidson in ascending tiers of streets. There was no time
for grading or paving. Two stories in the front meant four in the back,
the kitchens of B Street looked over the shingled roofs of the shops
on C Street. It was a gray town, clinging to a desolate mountain side,
in a gray country. At its base, appearing to force it up the slope, were
the hoisting works of the mines, dotted so close along the lode they
nearly touched. Every mine in this line was a mighty name in the
world of finance. New York, London and Paris waited each morning
to hear news from the town in the wilderness. And as the ant-hill
swarmed and trembled with the fury of its concentrated life, the
desert looked on, serene, incurious, still.
CHAPTER II
OLD FRIENDS WITH NEW FACES
The Allen girls moved to Virginia City in April. Their father had gone
there early in the year and taken a house which would be a proper
and fitting place from which to marry Rosamund. He had found what
he thought suitable in the mansion, as they called it in Virginia, of
one Murchison, a mining superintendent, who, in the heyday of
sudden riches, had built him a comfortable home and then died.
The Murchison mansion had come on the market just at the right
moment, Allen told people. Men wondered where his money came
from, as the current talk among his kind was that “the bottom had
fallen out of the Barranca, and Allen was bust.” He himself spread
the story that successful speculations had once again set him on his
feet. That something had done so was proved by his renting of the
Murchison mansion, a furnished house in the Virginia City of that
period being an expensive luxury.
It stood at the south end of B Street, perched high on the top of two
sloping terraces which were bulkheaded by a wooden wall,
surmounted by an ornamental balustrade. Small fruit trees and
flowering shrubs clothed the terraces in a thin, flickering foliage, just
showing its first, faint tips of green when the girls arrived. A long
flight of steps ran up to a balcony which rounded out about the front
door, and upon which one seemed to be mounted high in the air,
looking down over a dropping series of flat and peaked roofs to
where the dark red walls and tall chimneys of the hoisting works
clustered about the city’s feet. Beyond this unrolled the wild, bare
landscape, undulating line of mountain beyond mountain, cut clear
as cameos against the blue Nevada sky.
The vivid green streak made by the Carson River gleamed to the
right. At the limit of sight, fitted into a gap between the hills, was the
Carson desert, a patch of stark, yellow sand.
The girls were not surprised at the style of the house. They knew
vaguely that their father’s affairs were not as satisfactory as they had
been, but of their truly desperate nature they had no suspicion.
There were delays in the sale of the Folsom Street property, and it
was not till March that the new tenant appeared from Sacramento to
take possession. In response to their father’s orders they obediently
gathered together their belongings, closed the house, and made the
move to Virginia without assistance from him.
Events had fallen together in an unexpected way, but one that in the
end spared June those glimpses of her lover’s happiness that she
had told the Colonel would be unbearable. It is true that she had to
see the carriages drive to Jerry’s marriage and hear the sound of his
wedding bells. But before that event circumstances had developed
which made radical changes in the plans of bride and groom. Black
Dan had discovered that Jerry’s business had dwindled to nothing,
his private fortune vanished in the Crown Point collapse. The
bonanza king, with his rapidly accumulating millions, had a sturdy,
American objection to an idle man, especially when that man was to
be the husband of his only child, and was known to be of a light and
pleasure-loving temperament. A position was made for Jerry on the
Cresta Plata, with duties sufficiently exacting to keep him continually
occupied, and with the added attraction of an exceedingly generous
salary.
Mercedes sulked when she heard it. She did not want to live in
Virginia. She had thought she might go there from time to time, flit
through it, a disturbing vision of beauty to miners and millionaires,
but to take up her residence there was a different matter. She
wanted to occupy the fine house her father had given her in San
Francisco, entertain royally and be a queen of society, with Jerry as
a necessary satellite circling about. She complained to Black Dan,
even cried a little, and for the first time in her life found him obdurate.
The doting father was troubled about the future of his child. He
disliked the marriage she was making, but knew that to protest
against it was hopeless. He mistrusted Jerry, whose record he had
often heard canvassed, and whose style, as a charmer of women, he
despised. He wanted the pair under his eye. He wanted to keep his
hand tight on his son-in-law. He did not believe that the man loved
Mercedes, and he took a bitter satisfaction in bringing him to Virginia
and setting him to work.
“Rion and I can watch him,” he thought to himself. “We’ll keep his
nose to the grindstone, and if he shows any symptoms of lifting it
we’ll hold it closer.”
Black Dan said little of his uneasiness to any one save his brother.
The two men had the same opinion of Jerry, and though neither
expressed it to the other, each felt cold doubts as to the happiness of
the marriage.
Early in January, after a honeymoon of less than a week, Jerry was
summoned to his new duties. He and Mercedes were installed in a
house on B Street which had been hired and hastily refitted for them.
Here in the heart of a biting Nevada winter their married life began.
Neither bride nor groom guessed that it was being surreptitiously
watched by three pairs of interested eyes. To the observation of the
suspicious and inimical Graceys that of Colonel Parrish was added.
He too had come to Virginia on the first of January to assume his
position as assistant secretary of the Cresta Plata. He and Rion had
settled themselves in comfortable quarters on the floor over
Caswell’s drug store, where their rooms gave on a balustraded
wooden veranda which looked out on the turmoil of C Street.
It was not from Jerry, but from Mercedes that the first signs of
discontent came. She had hated Virginia from the first glimpse of it.
The cold, bleak town, buffeted by furious winds, clinging to its bare
mountain side, revolted her. Her little soul shrank before the
loneliness of the silent desert. She was essentially a Southron, a
lover of sunshine, bright colors, and gaiety. Moreover, for the first
time in her life, she felt neglected. In Virginia City in 1874 there were
more engrossing interests than the allurement of women. It was a
man’s town, where the softer sex was in the background, save as a
diversion and spectacular luxury. Mercedes was often lonely. Jerry
had flung himself into the speculative fever of the time with fury.
Even Black Dan was preoccupied and abrupt. Making millions is,
after all, the most absorbing pastime that man may know.
Finally a delicacy of the throat developed, and Mercedes looked pale
and thin, and began to cough. It was April, she had been married
four months, and she wanted to go; she wanted San Francisco and
sunshine, and the amusements for which she lived.
Jerry did not protest. The dream of passion was at an end. The
Mercedes he had come to know in the intimacy of married life was
so different a being from the Mercedes who had beguiled him in the
summer, that he was not sorry to have her leave him. His pride was
hurt and he felt angry and bitter against her, but he had no poignant
regrets. Neither had loved. The ignoble instincts that had drawn
them together were satiated. Her woman’s spite had worked itself
out. His lust for her wealth, his desire for her possession, were
satisfied. They were willing to part.
She left in April, it being understood that Jerry was to “go below” to
see her every two weeks. The story that her health had been
impaired by a climate which had proved too severe for many before
her, was given out as the reason for her departure. Black Dan even
was made to believe it. He also believed her assurances that she
would return in the summer. He thought the few tears she shed were
grief at parting with a husband whom he supposed she loved. He
determined to watch Jerry closer than ever, and for this purpose
moved into the house on B Street, where the husband was now left
alone.
Thus it fell out for June that she was spared the sight of Jerry as a
joyous bridegroom. Almost simultaneously with the Allens’ move to
Virginia, Mercedes left it. June and Rosamund were arranging the
Murchison mansion on B Street when Mrs. Jerome Barclay was
beginning those extensive purchases in San Francisco which were
to render her home on Van Ness Avenue a truly “palatial residence.”
June saw her old lover often. The contracted size of the town made it
impossible for her to avoid him. More than once they encountered
each other in the houses of friends, and were forced to interchange
the little dead phrases of society. Both were shaken by these
accidental meetings. June dreaded and shrank from the sight of his
face and the sound of his voice; but Jerry went away from her
presence, stirred and uplifted, his mind full of the thought of her, his
sense of her charm reawakened.
His life, crowded with the strenuous business of men, was empty of
what had been for years its main interest and preoccupation. The
vain man, confident of his attractions, had been played with and
scornfully cast aside. The bitterness of his marriage was as
wormwood to him. He felt sore toward Mercedes, whose indifference
toward him had roused in him the angry amaze that a spoiled child
feels toward the stranger who is proof against its blandishments. He
felt himself wronged, and in a way, trapped. They made him work
like a day laborer for his salary, and his wife had left him. That was
what he’d got by marrying! Lupé, poor, dead Lupé, would not have
treated him so! And June—what a fool he’d been! He forgot that
June had no money, and for that reason he had put her resolutely
aside. He forgot that last year he had avoided her and tried to banish
all thought of her. In his longing for the adulation and tenderness
upon which he had lived her image came nearer and nearer, grew
more and more disturbing and sweet.
Early in May Rosamund left for a week’s visit to San Francisco to
accomplish the major part of her trousseau-buying. June, left in the
Murchison mansion to “keep house”—a duty which she performed
but ill—found many empty hours on her hands. She had made few
friends in the new town. The apathy which had fallen on her at the
time of Jerry’s engagement had not lifted, and the coming loss of
Rosamund weighed heavier every day. In the tumult around her her
life was quiet and colorless. She told the Colonel that he was the
only constant visitor she had.
“If you’ve another as regular as I am,” he had answered, “I’ll have to
look into it.”
Then he had added, in what he fondly thought was a light,
unmeaning tone, “Don’t even see much of Rion?”
“Rion?” June had replied with the arched eyebrows of surprised
query. “I don’t see him at all.”
After that there was nothing more to be said, except of course for the
Colonel to go to Rion and ask him why he had not called on Miss
Allen, and for Rion, red and embarrassed, to answer that he did not
suppose Miss Allen would care to see him, but if she did he would
go.
There was one house to which she did pay constant visits. This was
Mitty Sullivan’s, on the north side of town, near the Cresta Plata
hoisting works.
These were booming days for Mitty. Her husband’s fortune was
mounting in leaps too vast and rapid to be easily calculated. The
Gracey boys’ belief in their superintendent had not been misplaced.
The brawny, half-educated Irishman had risen to a commanding
position, and was respectfully alluded to as having “the best nose for
ore in the two states.” He was already very rich, having for the past
four years successfully speculated on “inside information.” His great
gains made even the princely salary he received on the Cresta Plata
seem small. He was in the thick of the whirlpool now and Mitty was
with him. She had a baby, a girl, and she saw it, backed by the
fortune that she and Barney were making, going to Europe and
marrying “a lord.” For Mitty’s horizon had widened with astonishing
rapidity since the days when she waited on table at the Foleys hotel.
On one of the afternoons of Rosamund’s absence June walked
across town for a chat and a cup of tea with her old-time friend. From
B Street and its neat house-fronts and gardens she descended to
the never-ending movement of the street below. This—the main
stem of the mining city—for ever seething with a turbulent current of
life, was the once famous C Street, a thoroughfare unique in the
history of American towns.
The day shift would not be up for hours yet. When its time was up
the mines would vomit forth thousands of men, who, penned all day
in the dark, stifling heat of the underground city, would pour into the
garish brilliancy of the overground one for the diversions of the night.
Here, in the gusto of their liberation, they would range till daylight,
restless eddies of life, passing up one street and down the other,
never silent, never still, pressing vaguely on through the noise and
glare, with the encircling blackness hanging round their little piece of
the animated, outside world, like an inky curtain.
At all hours the street was crowded. Now it stretched up its mile or
two of uneven length like a gray cañon, filled to both walls with a
human river. Under the arcade formed by a continuous line of roofs
that jutted from the second-story windows across the sidewalk, an
endless throng passed up and down. They collected in groups
before shop windows, overflowed the sidewalk and encroached on
the middle of the roadway, congested in a close packed, swaying
mass of heads in front of the bulletin boards where the stock
quotations were pasted up, gathered in talkative knots at corners.
The street, in the mud of which playing cards, bits of orange peel,
fragments of theatrical posters, scraps of silk and ribbon were
imbedded like the pattern in a carpet, was as full as the sidewalk.
The day of the overland freighters was past, but ore wagons still
drove sixteen-mule teams, the driver guiding by a single rope, the
mules bending their necks under the picturesque arches of their
bells. Between these, busy managers flashed by in their buggies,
stopping here and there to lean from their seats for a moment’s
converse with a knot of men. In more fashionable equipages,
brought up from San Francisco and drawn by sleek-skinned, long-
tailed horses, the wives of suddenly enriched superintendents lolled
back gorgeously, their beruffled silk skirts floating out over the wheel,
the light flashing on their diamonds.
Over all this movement of life there was an unceasing swell of
sound, a combination of many notes and keys, more noticeable by
reason of the outlying rim of silence. Thousands of voices blended
into a single sonorous hum, through which broke the jingling of
pianos from the open doors of saloons, the click of billiard balls, the
cries of the drivers to their mules, the raucous voices of street
hawkers selling wares at populous corners, and the sweet, broken
melody of the bells. Beneath this—a continuous level undertone—
was the murmur of machinery, with the faint throb of the engines
beating through it like the sound of the steady, unagitated pulse-
beats of a laboring Titan.
June pressed through the throng, walking rapidly toward the upper
end of C Street. Here, looking down on the dark red walls and tall
chimneys of the Cresta Plata, stood the pretty, one-story cottage
where Mitty Sullivan lived. It was surrounded by a square of garden,
in which lilacs were budding and apple-trees showed a delicate hoar
of young blossom. Mitty’s prosperity revealed itself in many ways.
She had a nurse for the baby as well as a “hired girl.” She was
exceedingly anxious to spend money and very ignorant of how to do
it. She had passed the stage—a recognized station in the ascending
career of the western wife—where her husband had presented her
with diamond ear-rings. The silver, crystal, and Britannia metal in the
superintendent’s cottage were astonishing; only to be rivaled in
extravagance by the dresses which hung in Mitty’s own wardrobe
and which had been ordered—regardless of cost—from the best
dressmakers in San Francisco.
She greeted June with affection and drew her into the parlor, recently
furnished with a set of blue and gold brocade furniture, the windows
draped with lambrequins to match. There was a brilliant moquette
carpet on the floor and the walls were hung with oil paintings, which
Barney had bought on a recent visit to the coast. A quantity of
growing plants in the windows added a touch of beauty to the
glaring, over-furnished room.
Mitty herself had grown into a blooming matron, a trifle coarse, for
she was fond of “a good table” and saw to it that her hired girl knew
how to produce one, and already menaced by the embonpoint which
is so deadly a foe to Californian beauty. The baby girl on her arm
was a rosily healthy infant, with Barney’s red hair and her mother’s
freshness of color. Twenty years later she would bring her share of
the Bonanza fortune, which her father was then accumulating, to the
restoration of the old New York family into which she was to marry.
Her sister—yet unborn—was to do the same charitable act by the
castle and estates of an English earl, who in return would make her
a countess.
The greetings over, the baby was placed by the table in her high
chair and given a string of spools and a rubber rabbit to play with,
while Mitty, comfortably settling herself in an arm-chair, inquired if
June had noticed the stock quotations on her way down. The hired
girl, who was setting down the tea tray, listened with open attention
for the answer. Both mistress and maid were “plunging” according to
their means, and when June confessed that she had passed the
bulletins without reading the figures, the two speculators looked at
each other in open dismay.
“It’s so long to wait till Barney comes home,” Mitty complained. “I
thought of course you’d read them as you passed.”
June was contrite, but could remember nothing.
“And I wanted to know so much! They say that Peruvian’s getting
soft. They were saying so this morning anyway. You didn’t even hear
anything as you came along? I believe you’re the only woman in
Virginia who doesn’t speculate.”
June had not even heard. The knowing volubility of Mitty on the
fluctuations of stocks in which she was as well versed as Barney
himself, seemed little short of miraculous to the only woman in
Virginia who didn’t speculate.
The servant, who had been eagerly listening to the conversation,
now broke in.
“I’ll run up and have a squint round, Mrs. Sullivan. Maybe I can pick
up more than Miss Allen.”
Mitty tried to be dignified and give the proposition a deliberate
consideration. But her consent came with a promptitude it was
difficult to suppress. As the woman whisked out through the kitchen
door she said in a tone intended to excuse her lack of discipline:
“That girl’s got all her money in Peruvian, and hearing it was ‘soft’
has sort of upset her. Last week she told me she was thirty thousand
dollars ahead. She only came to live with us because Barney being
one of the big superintendents, she thought she’d get points, and as
she’s an A 1 girl I’ve got to humor her.”
They chatted over their tea, Mitty regaling her guest with the gossip
of the day, of which she was full. They had been talking some time
when the conversation turned on Mercedes and Jerry. It was the first
time the subject had come up between them. Mitty knew part at least
of her friend’s story, and she had tried to spare her, but she hated
Mercedes, who had treated her with scornful indifference, and she
hated Jerry because Barney did. She was glad now to give her
candid opinion to the woman they had combined to hurt.
“They said it was her health that was bad, and that was why she had
to quit and go below. Health!” with a compressing of the corners of
her mouth and a glance of sidelong meaning. “Her health’s all right; it
was her temper.”
“Temper!” said June faintly. “Uncle Jim said her throat was delicate
and she had a cough.”
“Cough!” snorted Mitty. “We all have coughs, but we don’t leave our
husbands and go cavorting down to San Francisco to throw round
money and pick up some other man. She didn’t care for him. That
was all that was the matter. It’s a simple disease and a lot of ’em get
it.”
June silently stirred her tea. Every word pierced her, but she wanted
to hear them. She had heard nothing of the separation, except the
generally accepted story of Mercedes’ delicate health. Instinct told
her that Mitty, the woman, had looked deeper and would know more
of what had really been the case. Without speaking she raised her
eyes from the cup and fixed them on the baby, who in an excess of
affection was licking the face of the rubber rabbit. Mitty went on with
complacent volubility:
“Barney thought maybe it was a baby. He’s a simple, innocent sort of
man, Barney Sullivan. But I said to him, ‘Don’t you fear, there won’t
be any babies in that house! The Lord ain’t goin’ to make such a
break as to give that woman a baby.’ I guess not,” said Mitty, folding
her arms and looking grimly round the room as if challenging an
unseen audience to contradict her.
June returned to the stirring of her tea while her hostess continued,
“No. She just hated Virginia. Nobody was standing round here to kiss
her boots and do the doormat act. And she didn’t like Jerry well
enough for him to make her stand it. You have to like a man a good
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like