コード例 #1
0
  @Test(expected = WidgetException.class)
  public void testIsAttributePresentException() throws WidgetException {
    wd.open(url);

    IElement element = new Element(getDiv("myContent"));
    element.isAttributePresent("randomAttrib");
  }
コード例 #2
0
  @Test
  public void testIsAttributePresentFalse() throws WidgetException {
    wd.open(url);

    IElement element = new Element(getDiv("content"));
    Assert.assertFalse(
        "Test isAttributePresent returns false", element.isAttributePresent("someAttribute"));
  }
コード例 #3
0
  @Test
  public void testIsAttributePresentTrue() throws WidgetException {
    wd.open(url);

    IElement element = new Element(getDiv("content"));
    Assert.assertTrue(
        "Test isAttributePresent returns true", element.isAttributePresent("randomAttrib"));
  }