Chapter 5

  1. Answer: The Page Object design pattern gives us a way to abstract our tests away so that we can make these tests more maintainable. We can make tests that only require updating if new steps have been added; otherwise, it just requires the page object to be updated.
  2. Answer: @FindBy(how=How.ID, using='myId').
  3. Answer: @CacheLookup.
  4. Answer: PageFactory.initElements();.

Get Learning Selenium Testing Tools - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.