public void switchToWysiwyg(boolean wait)
{
ensureElementIsNotCoveredByFloatingMenu(By.xpath(WYSIWYG_LOCATOR_FOR_WYSIWYG_TAB));
getSelenium().click(WYSIWYG_LOCATOR_FOR_WYSIWYG_TAB);
if (wait) {
new Wait()
{
public boolean until()
{
// When switching between tabs, it sometimes takes longer for toggle buttons to become enabled. We
// need to wait for that before we can properly use the WYSIWYG.