@Test @Templates("plain") public void testRightInactiveIcon() { By image = By.cssSelector(page.getRightIconSelector() + " img"); // icon should not be locateable for (int i = 1; i < 6; i++) { try { driver.findElement( ByJQuery.selector(page.getRightIconSelector().replace("1", String.valueOf(i)))); } catch (NoSuchElementException e) { // ok } } verifyStandardIcons( AccordionItemAttributes.rightInactiveIcon, page.getRightInactiveIcon(), image, ""); }
@Test @Templates("plain") public void testRightActiveIcon() { By image = By.cssSelector(page.getRightIconSelector() + " img"); // icon should not be locateable for (int i = 1; i < 6; i++) { try { driver.findElement( ByJQuery.selector(page.getRightIconSelector().replace("1", String.valueOf(i)))); } catch (NoSuchElementException e) { // ok } } guardAjax(page.getItemHeaders().get(0)).click(); waitAjax(driver).until().element(page.getItemContents().get(0)).is().visible(); verifyStandardIcons( AccordionItemAttributes.rightActiveIcon, page.getRightActiveIcon(), image, ""); }