Objective: Plug & chug, ~3 minutes: the two words underneath every Page Object you'll ever read.
⏱ ≈14 min full lesson · Converted from the O-01 module deck · English edition — Español · العربية · বাংলা in translation
Plug & chug, ~3 minutes: the two words underneath every Page Object you'll ever read.
Blueprint and house: A CLASS is a blueprint — a description of a thing. An OBJECT is an actual thing built from that blueprint. One blueprint, many houses.
The pair, in real code: HomePage is the class. The word new builds one object from it. po is that object — the house you can actually walk into. Code: class HomePage { /* the blueprint */ } | const po = new HomePage(page);
Plug & chug: Blueprint → houses. Recipe → cakes. Class → ______. And new is the moment a ______ gets built. (Answers: objects; an object.)
Class = blueprint, object = the built thing, new = the building. Next: what an object remembers — properties, and the constructor.