Selenium Page Object Code Generator
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.
- 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
Outline/Structure of the Demonstration
What is Page Object Model(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
Some more capabilities of POM Generator
Can we use this concept for generating code for other tools like Appium, Robotium etc.
Q & A
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.
Testers with automation basics