File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff 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 *
You can’t perform that action at this time.
0 commit comments