RiverGlider @ RiverGlide
location_on United Kingdom
By far the most common way to use Selenium to interact with an application is to code tests that have intimate knowledge of the underlying application. This is simple, but brittle. Others may try to make the test code intelligent, leading to a very complex testing framework. There is a middle ground.
Imagine that we are building a robot to move eggs. A simple robot can deal with identical eggs, but is brittle as soon as new eggs are introduced. An intelligent robot could adapt to variations with sensitive touch sensors. Or, we could use egg-holders with a handle on top. Now all we need is a simple robot that understands handles. If we then want to move something instead of eggs, we just need a new holder – the handles and the robot remain the same.
In this session you’ll learn the metaphor of Robot Handles, discuss ways that we can add meaningful interaction metadata into the application as we build it, and demonstrate how that can be just as helpful for humans as it is for robots
PageObjects have some common problems that many people see but not everyone can explain. Over time they can become harder and harder to maintain. In some cases, they become a tangled mess riddled with deep inheritance hierarchies. How can this happen?!
PageObjects provide an easy-to-follow, simple structure that avoids early maintenance issues. But, they break some key OO design rules, making maintenance more difficult over time. This can result in flaky tests. PageObjects were introduced to help test-developers avoid mistaking flaky tests for problems with Selenium. It was a useful first step, so why did we stop there?
In this session you’ll learn about the SOLID design principles that PageObjects disregard. You'll see why this leads to problems. You’ll see how and why PageObjects benefit from refactoring to SOLID design principles. Finally, you’ll meet the Screenplay Pattern; an alternative that can save you the effort.