Monday

Design Patterns in Test Automation




Page Object Pattern


  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • Page Object
    • Actions of the page
  • Page Object Validator
    • Validations/Assertions on the page
  • Tests Class 
    • Group of tests referencing the page objects, it can hold only a single instance of the page object. 


Facade Design Pattern


  • Facade
    • Holds methods that combine actions executed on multiple pages
  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • Page Object Validator
    • Validations/Assertions on the page
  • Tests Class 
    • Group of tests referencing the facade, it can hold only a single instance of the facade.


Singleton Design Pattern


  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • PageObject Element Map 
    • Properties of all web elements of the page and their locators
  • BasePage
    • Gives access to the child’s page element map class and defines a standard navigation operation.
  • BasePage 
    • Adds an instance to the child page’s validator class through the Validate method.
  • BaseSingleton 
    • This is an abstract class that provides a static property of its child instance.



Fluent Page Object Design Pattern


  • Page Objects (ItemPage)
    • Holds the actions that can be performed on the page like Search and Navigate. Exposes an easy access to the Page Validator though the Validate() method. 
  • BasePage
    • Gives access to the child’s page element map class and defines a standard navigation operation.
  • BasePage 
    • Adds an instance to the child page’s validator class through the Validate method.
  • BaseSingleton 
    • This is an abstract class that provides a static property of its child instance.
  • BaseElementMap
    • Provides easier access to current browser and functions to switch between different frames.
  • BasePageValidator
    • Gives all child validators instance to the current element map and the page object itself.

Source:  https://dzone.com/articles/observer-design-pattern-design

Google has implemented a headless option for Chrome

New Headless Chrome With Selenium WebDriver

So if you hadn't heard, Google has implemented a headless option for Chrome. This will be included from version 59, however you can download it now and a play using the Canary install. So I did just that.


Happy testing!

Friday

And I thought Machine Learning was cool..

Facebook is building brain-computer interfaces for typing and skin-hearing


Facebook is building brain-computer interfaces for typing and skin-hearing

Today at F8, Facebook revealed it has a team of 60 engineers working on building a brain-computer interface that will let you type with just your mind without invasive implants. The team plans to use optical imaging to scan your brain a hundred times per second to detect you speaking silently in your head, and translate it into text.

This week - Programming Turns 70

April 12th, 1947: ENIAC, the world's first general-purpose programmable electronic computer, ran the first code written in the modern paradigm, marking the birth of computer programming as a profession.

This first test code ran computations for the hydrogen bomb.
ENIAC could perform complex coded operations like loops, seen today in languages like JavaScript, Ruby and Python.

These first professional programmers were all WOMEN, a fact that took 50 years to be recognised.
Coding ENIAC to solve a single problem would take weeks. Today, you can build a website in a matter of hours!

Apple II at 40: Explore Mac History
On April 17, 1977, the Apple II computer was unveiled. 40 years later, your browser can load and run Classic Mac OS, its successor’s operating system, in seconds.