Search in sources :

Example 1 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement in project wcomponents by BorderTech.

the class WLabelExample_Test method testIsHidden.

@Test
public void testIsHidden() {
    SeleniumWLabelWebElement label = getDriver().findWLabel(byWComponentPath("WLabel[1]"));
    Assert.assertTrue(label.isHidden());
}
Also used : SeleniumWLabelWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement) Test(org.junit.Test)

Example 2 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement in project wcomponents by BorderTech.

the class WLabelExample_Test method testGetComponentComplex.

@Test
public void testGetComponentComplex() {
    SeleniumWComponentsWebDriver driver = getDriver();
    SeleniumWLabelWebElement label = driver.findWLabel(byWComponentPath("WLabel[7]"));
    SeleniumWComponentWebElement expected = driver.findElement(byWComponentPath("WCheckBoxSelect[1]"));
    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)

Example 3 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement in project wcomponents by BorderTech.

the class WLabelExample_Test method testIsReadOnly.

@Test
public void testIsReadOnly() {
    SeleniumWLabelWebElement label = getDriver().findWLabel(byWComponentPath("WLabel[2]"));
    Assert.assertTrue(label.isReadOnly());
}
Also used : SeleniumWLabelWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement) Test(org.junit.Test)

Example 4 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement in project wcomponents by BorderTech.

the class WLabelExample_Test method testGetByTextHidden.

@Test
public void testGetByTextHidden() {
    SeleniumWLabelWebElement label = getDriver().findWLabel(byWComponentPath("WLabel[1]"));
    Assert.assertTrue(label.isHidden());
    String text = label.getText();
    Assert.assertNotNull(getDriver().findWLabelWithPartialText(text));
}
Also used : SeleniumWLabelWebElement(com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement) Test(org.junit.Test)

Example 5 with SeleniumWLabelWebElement

use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWLabelWebElement in project wcomponents by BorderTech.

the class WLabelExample_Test method testGetComponentSimple.

@Test
public void testGetComponentSimple() {
    SeleniumWComponentsWebDriver driver = getDriver();
    SeleniumWLabelWebElement label = driver.findWLabel(byWComponentPath("WLabel[0]"));
    SeleniumWComponentWebElement expected = driver.findElement(byWComponentPath("WTextField[0]"));
    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