コード例 #1
0
ファイル: Fluent.java プロジェクト: KyleRogers/FluentLenium
  /**
   * 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;
  }
コード例 #2
0
 // @Override
 public void afterNavigateForward(WebDriver driver) {
   log.info("Opened page from history: '" + driver.getCurrentUrl() + "'");
 }