Class Page

  • Direct Known Subclasses:
    JQueryPage

    public abstract class Page
    extends Object
    Abstract base class for page objects. Checks the current url when creating.
    Author:
    Daniel Keiss <daniel.keiss@telekom.de>, Tim Jödicke - First implementation of checkPageState() in project using bdd-web-app

    Copyright (c) 2020 Daniel Keiss, Deutsche Telekom IT GmbH This file is distributed under the conditions of the Apache License, Version 2.0. For details see the file license on the toplevel.

    • Field Detail

      • driver

        protected final org.openqa.selenium.WebDriver driver
    • Constructor Detail

      • Page

        public Page​(org.openqa.selenium.WebDriver driver)
    • Method Detail

      • checkPage

        public void checkPage()
        Check if the page is the right one. By default, the URL is checked. If necessary, another check can be used by implementing checkPageDesignator(), e.g. for single page applications.
      • checkUrl

        public void checkUrl()
        Check if the expected URL matches the current one. Used by checkPage().
      • checkPageState

        public void checkPageState()
        Check if the page is completely loaded. Used by checkPage().
      • checkPageDesignator

        public void checkPageDesignator()
        Override this if you wan't to assert the page by a web element, e.g. in single page applications. Used by checkPage().
      • reload

        public void reload()
      • waitFor

        public void waitFor​(long milliseconds)
      • getURL

        public abstract String getURL()