use of com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver in project wcomponents by BorderTech.
the class WLabelExample_Test method testGetByLabelSimplePartial.
@Test
public void testGetByLabelSimplePartial() {
String labelText = "Normal input";
SeleniumWComponentsWebDriver driver = getDriver();
SeleniumWComponentWebElement expected = driver.findElement(byWComponentPath("WTextField[0]"));
SeleniumWComponentWebElement actual = driver.findElement(new ByLabel(labelText, true));
Assert.assertEquals(expected.getAttribute("id"), actual.getAttribute("id"));
}
use of com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver in project wcomponents by BorderTech.
the class WLabelExample_Test method testGetComponentReadOnly.
@Test
public void testGetComponentReadOnly() {
SeleniumWComponentsWebDriver driver = getDriver();
SeleniumWLabelWebElement label = driver.findWLabel(byWComponentPath("WLabel[2]"));
Assert.assertTrue(label.isReadOnly());
SeleniumWComponentWebElement expected = driver.findElement(byWComponentPath("WTextField[2]"));
Assert.assertEquals(expected.getAttribute("id"), label.getLabelledComponent().getAttribute("id"));
}
use of com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver 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.driver.SeleniumWComponentsWebDriver 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());
}
use of com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver in project wcomponents by BorderTech.
the class WRadioButtonSelectExample_Test method testGetOptions.
@Test
public void testGetOptions() {
SeleniumWComponentsWebDriver driver = getDriver();
Assert.assertEquals(9, getExampleNoSelection().getOptions().size());
Assert.assertEquals(9, getDisabledExample().getOptions().size());
Assert.assertTrue(CollectionUtils.isEmpty(getReadOnlyExampleNoSelection().getOptions()));
// interactive but no options
Assert.assertTrue(CollectionUtils.isEmpty(driver.findWRadioButtonSelect(new ByLabel("Select from no options", false)).getOptions()));
}
Aggregations