diff --git a/src/JoomlaBrowser.php b/src/JoomlaBrowser.php index 81ad103..f66c517 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(['id' => 'installbutton_directory']); // Install button $I->waitForText('was successful','60', ['id' => 'system-message-container']); $this->debug("$type successfully installed from $path"); } @@ -349,9 +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); - // @todo: we need to find a better locator for the following Install button - $I->click(['xpath' => "//button[contains(@onclick,'Joomla.submitbutton4()')]"]); // 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') {