@Test(expected = WidgetException.class) public void testGetTextException() throws WidgetException { wd.open(url); IElement element = new Element(getSpan("INVALIDsomeText")); element.getText(); }
@Test public void testGetText() throws WidgetException { wd.open(url); IElement element = new Element(getSpan("someText")); String exp = "Here is some text"; Assert.assertEquals(exp, element.getText()); }
@Test public void testMouseMoveOut() throws WidgetException { wd.open(url); IInteractiveElement ie = new InteractiveElement(getDiv("dest")); IElement element = new Element(getDiv("content")); ie.waitForElementPresent(); ie.mouseMove(); ie.mouseMoveOut(); Assert.assertEquals("Mouse Moved Out", element.getText()); }
@Test public void testCSSSelector2() throws WidgetException { wd.open(url); IElement e = new Element("#removeContent>span"); Assert.assertEquals("Here is some text", e.getText()); }
@Test public void testCSSSelector() throws WidgetException { wd.open(url); IElement e = new Element("#myButton"); Assert.assertEquals("Click me", e.getText()); }