Пример #1
0
  /**
   * Return the url of the page. If a base url is provided, the current url will be relative to that
   * base url.
   *
   * @return
   */
  public String url() {
    String currentUrl = driver.getCurrentUrl();

    if (currentUrl != null && baseUrl != null && currentUrl.startsWith(baseUrl)) {
      currentUrl = currentUrl.substring(baseUrl.length());
    }

    return currentUrl;
  }
 // @Override
 public void afterNavigateForward(WebDriver driver) {
   log.info("Opened page from history: '" + driver.getCurrentUrl() + "'");
 }