3 namespace Zumba\GastonJS\Browser;
5 use Zumba\GastonJS\Exception\BrowserError;
8 * Trait BrowserNavigateTrait
9 * @package Zumba\GastonJS\Browser
11 trait BrowserNavigateTrait {
14 * Send a visit command to the browser
18 public function visit($url) {
19 return $this->command('visit', $url);
23 * Gets the current url we are in
26 public function currentUrl() {
27 return $this->command('current_url');
31 * Goes back on the browser history if possible
33 * @throws BrowserError
36 public function goBack() {
37 return $this->command('go_back');
41 * Goes forward on the browser history if possible
43 * @throws BrowserError
46 public function goForward() {
47 return $this->command('go_forward');
51 * Reloads the current page we are in
53 public function reload() {
54 return $this->command('reload');