This repository has been archived on 2025-09-29. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php

49 lines
726 B
PHP

<?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();
}
}