public static void assertNotSelectedLabel(
      LiferaySelenium liferaySelenium, String selectLocator, String pattern) throws Exception {

    liferaySelenium.assertElementPresent(selectLocator);

    if (liferaySelenium.isSelectedLabel(selectLocator, pattern)) {
      String text = liferaySelenium.getSelectedLabel(selectLocator);

      throw new Exception(
          "Pattern \"" + pattern + "\" matches \"" + text + "\" at \"" + selectLocator + "\"");
    }
  }