Mercurial > hg > isophonics-drupal-site
comparison vendor/jcalderonzumba/mink-phantomjs-driver/src/NavigationTrait.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Zumba\Mink\Driver; | |
4 | |
5 /** | |
6 * Trait NavigationTrait | |
7 * @package Zumba\Mink\Driver | |
8 */ | |
9 trait NavigationTrait { | |
10 /** | |
11 * Visits a given url | |
12 * @param string $url | |
13 */ | |
14 public function visit($url) { | |
15 $this->browser->visit($url); | |
16 } | |
17 | |
18 /** | |
19 * Gets the current url if any | |
20 * @return string | |
21 */ | |
22 public function getCurrentUrl() { | |
23 return $this->browser->currentUrl(); | |
24 } | |
25 | |
26 | |
27 /** | |
28 * Reloads the page if possible | |
29 */ | |
30 public function reload() { | |
31 $this->browser->reload(); | |
32 } | |
33 | |
34 /** | |
35 * Goes forward if possible | |
36 */ | |
37 public function forward() { | |
38 $this->browser->goForward(); | |
39 } | |
40 | |
41 /** | |
42 * Goes back if possible | |
43 */ | |
44 public function back() { | |
45 $this->browser->goBack(); | |
46 } | |
47 | |
48 | |
49 } |