Search in sources :

Example 6 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement 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"));
}
Also used : SeleniumWComponentsWebDriver(com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver) SeleniumWLabelWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement) SeleniumWComponentWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement) Test(org.junit.Test)

Aggregations

SeleniumWLabelWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement)6 Test (org.junit.Test)6 SeleniumWComponentsWebDriver (com.github.bordertech.wcomponents.test.selenium.driver.SeleniumWComponentsWebDriver)3 SeleniumWComponentWebElement (com.github.bordertech.wcomponents.test.selenium.element.SeleniumWComponentWebElement)3