Modified clickOnMenuItem()