From bd14e669fb59ecc56b3165aba80967e69f2c8e19 Mon Sep 17 00:00:00 2001 From: Tito Alvarez Date: Sun, 5 Aug 2018 11:41:30 -0600 Subject: [PATCH 1/4] [imp] Locator getter --- src/JoomlaBrowser.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index e5432eb..39d51b7 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -50,6 +50,24 @@ class JoomlaBrowser extends WebDriver */ protected $locator; + /** + * Getting a locator path from $this->locator (Locators) + * + * @param string $locator Locator to get + * + * @return mixed|false + * @since 3.8.11 + */ + public function getLocatorPath($locator) + { + if (!isset($this->locator->$locator)) + { + return false; + } + + return $this->locator->$locator; + } + /** * Module constructor. * From 67cdedd3dca10e3addbd3def6bd49d05bb5a10ab Mon Sep 17 00:00:00 2001 From: Tito Alvarez Date: Sun, 5 Aug 2018 11:47:35 -0600 Subject: [PATCH 2/4] [imp] Locator getter --- src/JoomlaBrowser.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 39d51b7..8dbaca8 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -50,24 +50,6 @@ class JoomlaBrowser extends WebDriver */ protected $locator; - /** - * Getting a locator path from $this->locator (Locators) - * - * @param string $locator Locator to get - * - * @return mixed|false - * @since 3.8.11 - */ - public function getLocatorPath($locator) - { - if (!isset($this->locator->$locator)) - { - return false; - } - - return $this->locator->$locator; - } - /** * Module constructor. * @@ -117,6 +99,24 @@ protected function instantiateLocator() $this->locator = new $class; } + /** + * Locator getter + * + * @param string $locator Locator to get + * + * @return mixed|false + * @since 3.8.11 + */ + public function getLocatorPath($locator) + { + if (!isset($this->locator->$locator)) + { + return false; + } + + return $this->locator->$locator; + } + /** * Function to Do Admin Login In Joomla! * From c96770faaec47931286129d064ea00ad9b6f4a3c Mon Sep 17 00:00:00 2001 From: Tito Alvarez Date: Mon, 13 Aug 2018 16:33:37 -0600 Subject: [PATCH 3/4] Locator getter $path --- src/JoomlaBrowser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 2aa97aa..a922b30 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -107,14 +107,14 @@ protected function instantiateLocator() * @return mixed|false * @since 3.8.11 */ - public function getLocatorPath($locator) + public function getLocatorPath($path) { - if (!isset($this->locator->$locator)) + if (!isset($this->locator->$path)) { return false; } - return $this->locator->$locator; + return $this->locator->$path; } /** From c25380b4bd70ba5225f93caef845eb1e2f7c8943 Mon Sep 17 00:00:00 2001 From: Tito Alvarez Date: Mon, 3 Sep 2018 16:04:46 -0600 Subject: [PATCH 4/4] Fixed annotation --- src/JoomlaBrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index ea6b244..a24df50 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -102,7 +102,7 @@ protected function instantiateLocator() /** * Locator getter * - * @param string $locator Locator to get + * @param string $path Locator to get * * @return mixed|false * @since 3.8.11