You are here

trait NavigationTrait in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php \Zumba\Mink\Driver\NavigationTrait

Trait NavigationTrait @package Zumba\Mink\Driver

Hierarchy

File

vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php, line 9

Namespace

Zumba\Mink\Driver
View source
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();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
NavigationTrait::back public function Goes back if possible
NavigationTrait::forward public function Goes forward if possible
NavigationTrait::getCurrentUrl public function Gets the current url if any
NavigationTrait::reload public function Reloads the page if possible
NavigationTrait::visit public function Visits a given url