Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Behavior-driven development with Javascript

You're reading from   Learning Behavior-driven development with Javascript Create powerful yet simple-to-code BDD test suites in JavaScript using the most popular tools in the community

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784392642
Length 392 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Enrique Javier A Rubio Enrique Javier A Rubio
Author Profile Icon Enrique Javier A Rubio
Enrique Javier A Rubio
Arrow right icon
View More author details
Toc

Chapter 7. The Page Object Pattern

In this chapter, we will try to better organize the test codebase we created in the previous chapter. In order to do so, you will learn the Page Object pattern. This pattern will allow us to simplify our test code and encapsulate the complexity of using WebDriver and accessing the DOM in a nice object that we can reuse across all of our codebase.

In this chapter, you will learn:

  • What the Page Object pattern is and why to use it
  • Best practices to design a page object
  • How to save code by designing a library of small reusable page objects
  • How to build a page object using WebDriver
  • How to properly test the navigation logic of our application (do not do this in the page object)
lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Behavior-driven development with Javascript
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon