A Story of POM (Page Object Model)


One day Mickey was sitting at a train station when Minnie came running to him

Mickey – Hey Minnie, what happened?

Minnie – Hi Mickey, I have been looking for you

Mickey – Tell me

Minnie – Mickey, I keep hearing about something called “Page Object Model” What’s that?

Mickey – Ok, I know you understand better with story

Minnie – Yes

Mickey – Ok, we have some time before your train arrives, Let’s go and find a place to sit

(Mickey and Minnie found a silent space and sat there)

Mickey – The Page Object Model is like having a map that helps you find your toys in different rooms of your magical clubhouse without getting lost

HEY DUGGEE SQUIRREL CLUBHOUSE PLAYSET - The Toy Insider

Minnie – Oh, like a treasure map to find all my toys? That sounds fun!

Mickey – Exactly! Let me tell you a little story. Imagine our magical clubhouse has rooms for games, crafts, and snacks. Each room has its own set of toys

Minnie – I love all those rooms! But what does it have to do with the Page Object Model?

Mickey – Well, think of each room as a different page on your favorite website or game. Now, instead of randomly searching for toys in each room, the Page Object Model is like having a special guide for each room, telling you where to find specific toys

Minnie – So, it’s like having a helper to find my toys in each room!

Mickey – Exactly! Let’s say you have a favorite game in the games room, and it has buttons like “Play” and “Pause.” Instead of searching for these buttons every time, the Page Object Model creates a map, or a guide, for that game room. It says, “Hey, the ‘Play’ button is here, and the ‘Pause’ button is there.”

Minnie – Oh, like a special guide for each game so I don’t have to look around every time!

Mickey – Exactly, Minnie! And in the computer world, when you’re testing websites or games, the Page Object Model helps testers find and interact with different elements, like buttons and text boxes, on each page without getting lost.

Minnie – So, it’s like a magical map for the computer!

Mickey – You got it, Minnie! Just like your magical map for finding toys in our clubhouse, the Page Object Model helps testers find and play with elements on different pages in the digital world

Page Object Model creates guides for these pages.

Minnie – Oh, like having a map for the computer to find the “Buy Now” button!

Mickey – Exactly! If the “Buy Now” button is on the shopping page, the Page Object Model creates a guide that says, “Hey, the ‘Buy Now’ button is right here on the shopping page.” So, when testers want to click the “Buy Now” button, they follow the guide without getting lost in the digital world.

Minnie – That sounds super helpful! No more getting lost in the computer clubhouse!

Mickey – Absolutely! The Page Object Model is like your trusty guide, making sure you always know where to find your favorite toys in the magical world of websites and games.

Minnie – What happens if the website builders decide to move things around? Will I get lost?

Mickey – Great question, Minnie! That’s where the Page Object Model comes to the rescue. Imagine the website builders decide to rearrange the buttons on the Adventure page of an online bookstore.

Minnie – Oh no, what will happen to our guides?

Mickey – Don’t worry, Minnie! The Page Object Model is like a magical guide that keeps things in order. When the developers move buttons or change things, they update the guides accordingly.

Minnie – So, our guides always know where everything is, even if it moves?

Mickey – Exactly! Let’s say the ‘Add to Cart’ button, which used to be in one spot, gets a new hiding place. The Page Object Model updates the guide for the Adventure page and says, “Hey, the ‘Add to Cart’ button has a new address now.”

Minnie – That’s so clever! So, I won’t have trouble finding my favorite books even if the buttons play hide and seek!

Mickey – Precisely, Minnie! The Page Object Model helps testers quickly adapt to changes made by the developers. It’s like having a magical friend who always knows where your favorite things are, even if they decide to move around

Page Object Model. What is Page Object Model (POM)? | by Kenil Fadia | Medium
Ref: https://kenilpfadia.medium.com/page-object-model-ce6570e30852

Minnie – Wow, I can now relate things. Looks like some secrets of the Universe are getting unfolded

Mickey – That’s a heavy statement

Minnie – I am so happy I met you today

Mickey – Me too, Minnie, I hear the announcement for your train

Minnie – I am going to miss my train

Mickey – Why

Minnie – Don’t worry, I will take the next one, Just want to spend some more time with you

Mickey – Okay then, let’s have something to eat

Minnie – You are my best friend Mickey

Mickey – I am always here for you 🙂

about the author  |  more stories

 

23