@Test
  @Templates(value = {"plain"})
  public void testSwitchToItem() {
    List<WebElement> buttons =
        Lists.newArrayList(switchTo1Button, switchTo2Button, switchTo3Button, switchTo5Button);
    List<String> headers = Lists.newArrayList("Item 1", "Item 2", "Item 3", "Item 5");
    for (int i = 0; i < buttons.size(); i++) {
      Graphene.guardAjax(buttons.get(i)).click();
      assertEquals(accordion.advanced().getActiveItem().advanced().getHeader(), headers.get(i));
    }

    // switch to disabled item
    Graphene.guardNoRequest(switchTo4Button).click();
    assertEquals(
        accordion.advanced().getActiveItem().advanced().getHeader(),
        "Item 5",
        "Active item should not change.");
  }
 public boolean isAccordionVisible() {
   return new WebElementConditionFactory(accordion.advanced().getRootElement())
           .isPresent()
           .apply(driver)
       && accordion.advanced().getRootElement().isDisplayed();
 }
 public WebElement getAccordionRootElement() {
   return accordion.advanced().getRootElement();
 }