From a0b65b64efd65142f02017f741287fe0a1b2b318 Mon Sep 17 00:00:00 2001 From: Jelle Kok Date: Sun, 8 May 2016 17:04:02 +0200 Subject: [PATCH 1/3] Fix installExtensionFromFolder on J36 --- src/JoomlaBrowser.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 81ad103..3ed1ea6 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -328,8 +328,7 @@ public function installExtensionFromFolder($path, $type = 'Extension') $I->click(['link' => 'Install from Folder']); $this->debug('I enter the Path'); $I->fillField(['id' => 'install_directory'], $path); - // @todo: we need to find a better locator for the following Install button - $I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton3()')]"]); // Install button + $I->click(['xpath' => "//div[@id='folder']/fieldset/div[2]/input"]); // Install button $I->waitForText('was successful','60', ['id' => 'system-message-container']); $this->debug("$type successfully installed from $path"); } From 81fd89fe765eca9ca437d46cd641a91c4ecb0645 Mon Sep 17 00:00:00 2001 From: Jelle Kok Date: Sun, 8 May 2016 17:38:40 +0200 Subject: [PATCH 2/3] Also fix from url --- src/JoomlaBrowser.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 3ed1ea6..2d5cac4 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -349,8 +349,7 @@ public function installExtensionFromUrl($url, $type = 'Extension') $I->click(['link' => 'Install from URL']); $this->debug('I enter the url'); $I->fillField(['id' => 'install_url'], $url); - // @todo: we need to find a better locator for the following Install button - $I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton4()')]"]); // Install button + $I->click(['xpath' => "//div[@id='url']/fieldset/div[2]/input"]); // Install button $I->waitForText('was successful','30', ['id' => 'system-message-container']); if ($type == 'Extension') { From 9dc3b8360122c2d4c14fee55f5dcff572e5f663d Mon Sep 17 00:00:00 2001 From: Jelle Kok Date: Sun, 8 May 2016 20:43:31 +0200 Subject: [PATCH 3/3] Update id names --- src/JoomlaBrowser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 2d5cac4..f66c517 100644 --- a/src/JoomlaBrowser.php +++ b/src/JoomlaBrowser.php @@ -328,7 +328,7 @@ public function installExtensionFromFolder($path, $type = 'Extension') $I->click(['link' => 'Install from Folder']); $this->debug('I enter the Path'); $I->fillField(['id' => 'install_directory'], $path); - $I->click(['xpath' => "//div[@id='folder']/fieldset/div[2]/input"]); // Install button + $I->click(['id' => 'installbutton_directory']); // Install button $I->waitForText('was successful','60', ['id' => 'system-message-container']); $this->debug("$type successfully installed from $path"); } @@ -348,8 +348,8 @@ public function installExtensionFromUrl($url, $type = 'Extension') $I->waitForText('Extensions: Install','30', ['css' => 'H1']); $I->click(['link' => 'Install from URL']); $this->debug('I enter the url'); - $I->fillField(['id' => 'install_url'], $url); - $I->click(['xpath' => "//div[@id='url']/fieldset/div[2]/input"]); // Install button + $I->fillField(['id' => 'install_url'], $url); + $I->click(['id' => 'installbutton_url']); // Install button $I->waitForText('was successful','30', ['id' => 'system-message-container']); if ($type == 'Extension') {