Skip to content

Commit b1b83dc

Browse files
authored
Merge pull request #155 from puneet0191/add-Disable-Plugin
Adding a Plugin Disable Function
2 parents ad0751d + 3cf4a10 commit b1b83dc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/JoomlaBrowser.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,28 @@ private function searchResultPluginName($pluginName)
741741
return $path;
742742
}
743743

744+
/**
745+
* Function to Disable a Plugin
746+
*
747+
* @param String $pluginName Name of the Plugin
748+
*
749+
* @return void
750+
*
751+
* @since 3.0.0
752+
*/
753+
public function disablePlugin($pluginName)
754+
{
755+
$this->amOnPage('/administrator/index.php?option=com_plugins');
756+
$this->debug('I check for Notices and Warnings');
757+
$this->checkForPhpNoticesOrWarnings();
758+
$this->searchForItem($pluginName);
759+
$this->waitForElement($this->searchResultPluginName($pluginName), 30);
760+
$this->checkExistenceOf($pluginName);
761+
$this->click(['xpath' => "//input[@id='cb0']"]);
762+
$this->click(['xpath' => "//div[@id='toolbar-unpublish']/button"]);
763+
$this->see(' disabled', ['id' => 'system-message-container']);
764+
}
765+
744766
/**
745767
* Uninstall Extension based on a name
746768
*

0 commit comments

Comments
 (0)