view vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
line wrap: on
line source
<?php

namespace Zumba\Mink\Driver;

/**
 * Trait NavigationTrait
 * @package Zumba\Mink\Driver
 */
trait NavigationTrait {
  /**
   * Visits a given url
   * @param string $url
   */
  public function visit($url) {
    $this->browser->visit($url);
  }

  /**
   * Gets the current url if any
   * @return string
   */
  public function getCurrentUrl() {
    return $this->browser->currentUrl();
  }


  /**
   * Reloads the page if possible
   */
  public function reload() {
    $this->browser->reload();
  }

  /**
   * Goes forward if possible
   */
  public function forward() {
    $this->browser->goForward();
  }

  /**
   * Goes back if possible
   */
  public function back() {
    $this->browser->goBack();
  }


}