Page Object pattern provides its host advantages like script maintainability, script legibility and clarity but at the same time, it needs too much of mundane and repetitive coding effort in creating page objects.

Selenium Page Object Code Generator automatically generates the code for Page Objects. We have been using this from past few years and it reduces hours of coding effort to minutes.

 

Features:

  • Generates code for Page Objects
  • Generates a method which is used to fill the form for a given page
  • Generates code for a method which captures error messages from a page
  • Generates a method which tests Field level validations of a given page(using TestNG Data Provider)
  • Generates the TestNG Data Provider for the Field level Validation method
 
3 favorite thumb_down thumb_up 0 comments visibility_off  Remove from Watchlist visibility  Add to Watchlist
 

Outline/structure of the Session

What  is Page Object Model(POM)

Why POM

Downside of Page Object Model

Calculating Effort for writing  code of  single page object with example

Some thoughts on minimizing or nullifying above coding effort

Build your own Page Object Code Generator

Page Object Generator: How can it generates the code?

  • Define naming standards for the Locators
  • Define naming standards for the Methods/Actions
  • Define the type of methods for each element type
  • Logic for building a Code Generator
  • Demonstration 

Some more capabilities of POM Generator

Benifits

Can we use this concept for generating code for other tools like Appium, Robotium etc.

Q & A

Learning Outcome

By attending this session one can use existing SeleniumCodeGenerator to generate code for Page Objects  or can build their own page object code generator for Selenium or Appium or Robotium etc.

Target Audience

Testers with automation basics

schedule Submitted 1 year ago

Comments Subscribe to Comments

comment Comment on this Proposal