public function createMenuItem($menuTitle, $menuCategory, $menuItem, $menu = 'Main Menu', $language = 'All')
	{
		$this->debug("I open the menus page");
		$this->amOnPage('administrator/index.php?option=com_menus&view=menus');
		$this->waitForText('Menus', TIMEOUT, array('css' => 'H1'));
		$this->checkForPhpNoticesOrWarnings();

		$this->debug("I click in the menu: $menu");
		$this->click(array('link' => $menu));
		$this->waitForText('Menus: Items', TIMEOUT, array('css' => 'H1'));
		$this->checkForPhpNoticesOrWarnings();

		$this->debug("I click new");
		$this->click("New");
		$this->waitForText('Menus: New Item', TIMEOUT, array('css' => 'h1'));
		$this->checkForPhpNoticesOrWarnings();
		$this->fillField(array('id' => 'jform_title'), $menuTitle);

		$this->debug("Open the menu types iframe");
		$this->click(array('link' => "Select"));
		$this->waitForElement(array('id' => 'menuTypeModal'), TIMEOUT);
		$this->wait(1);
		$this->switchToIFrame("Menu Item Type");

		$this->debug("Open the menu category: $menuCategory");

		// Open the category
		$this->wait(1);
		$this->waitForElement(array('link' => $menuCategory), TIMEOUT);
		$this->click(array('link' => $menuCategory));

		$this->debug("Choose the menu item type: $menuItem");
		$this->wait(1);
		$this->waitForElement(array('xpath' => "//a[contains(text()[normalize-space()], '$menuItem')]"), TIMEOUT);
		$this->click(array('xpath' => "//div[@id='collapseTypes']//a[contains(text()[normalize-space()], '$menuItem')]"));
		$this->debug('I switch back to the main window');
		$this->switchToIFrame();
		$this->debug('I leave time to the iframe to close');
		$this->wait(2);
		$this->selectOptionInChosen('Language', $language);
		$this->waitForText('Menus: New Item', '30', array('css' => 'h1'));
		$this->debug('I save the menu');
		$this->click("Save");

		$this->waitForText('Menu item saved', TIMEOUT, array('id' => 'system-message-container'));
	}