~/talk

The Screenplay Pattern: Better Interactions for Better Automation

Talkat Selenium Conf 2022 · 2022-07-29..07-30· [testing]
slides:none on file

Claims that the Screenplay Pattern reduces duplication and flakiness compared with Page Objects and demonstrates it with a C# library Boa Constrictor used at PrecisionLender, implemented against a DuckDuckGo web UI search and a Dog API REST test. Code shows actors with abilities that drive Selenium WebDriver (Selenium 4) and RestSharp, composable tasks and questions like actors use abilities to perform interactions, built‑in waits that poll until a question is true, a composed search task (send keys + click), and clean browser quit behavior.

AI-written summary · about

  1. 0:00Intro
  2. 3:36A simple DuckDuckGo search test
  3. 4:39Raw WebDriver calls
  4. 6:26Explicit waits
  5. 7:09Duplicate code
  6. 7:25Unintuitive code
  7. 9:08Page Object Pattern usage
  8. 9:33Page object duplication redux
  9. 10:31A base page
  10. 10:54Base page inheritance
  11. 11:12Even more duplication?
  12. 12:54Reconsidering interactions
  13. 15:09Boa Constrictor
  14. 16:04Required packages
  15. 16:21Creating the Actor
  16. 17:10Adding Abilities
  17. 18:18Modeling web pages
  18. 19:29Attempting a Task
  19. 21:15Asking a Question
  20. 23:00Composing a custom Interaction
  21. 24:04Waiting for Questions to yield answers
  22. 26:11Quitting the web browser
  23. 26:36A completed test
  24. 26:49A REST API test
  25. 29:01SOLID principles
  26. 29:33Why use Screenplay?
  27. 31:19Actors use Abilities to perform Interactions
  28. 31:31Getting started
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.