use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMessagesWebElement in project wcomponents by BorderTech.
the class WMessagesExample_Test method testMessageBoxTypes.
@Test
public void testMessageBoxTypes() {
SeleniumWComponentsWebDriver driver = getDriver();
SeleniumWMessagesWebElement messages = driver.findWMessages(byWComponentPath("WMessages[0]"));
List<SeleniumWMessageBoxWebElement> messageBoxes = messages.getMessageBoxes();
Assert.assertEquals(4, messageBoxes.size());
// first one is expected to be an error box
Assert.assertTrue(messageBoxes.get(0).getAttribute("class").contains(SeleniumWMessageBoxWebElement.TYPE_ERROR_CLASS_NAME));
Assert.assertTrue(messageBoxes.get(1).getAttribute("class").contains(SeleniumWMessageBoxWebElement.TYPE_WARNING_CLASS_NAME));
Assert.assertTrue(messageBoxes.get(2).getAttribute("class").contains(SeleniumWMessageBoxWebElement.TYPE_INFO_CLASS_NAME));
Assert.assertTrue(messageBoxes.get(3).getAttribute("class").contains(SeleniumWMessageBoxWebElement.TYPE_SUCCESS_CLASS_NAME));
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMessagesWebElement in project wcomponents by BorderTech.
the class WMessagesExample_Test method testHiddenWMessages.
@Test
public void testHiddenWMessages() {
SeleniumWComponentsWebDriver driver = getDriver();
SeleniumWMessagesWebElement messages = driver.findWMessages(byWComponentPath("WMessages[1]"));
Assert.assertTrue(messages.isHidden());
Assert.assertFalse(messages.isDisplayed());
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMessagesWebElement in project wcomponents by BorderTech.
the class WMessagesExample_Test method testMessageBoxes.
@Test
public void testMessageBoxes() {
SeleniumWComponentsWebDriver driver = getDriver();
SeleniumWMessagesWebElement messages = driver.findWMessages(byWComponentPath("WMessages[0]"));
List<SeleniumWMessageBoxWebElement> messageBoxes = messages.getMessageBoxes();
Assert.assertEquals(4, messageBoxes.size());
}
Aggregations