@@ -0,0 +1,2404 @@
+package hu.pazsitz.pacuse.tests.cucumber.featuretables;%0A%0Aimport hu.pazsitz.pacuse.tests.annotations.DataTableAttributes;%0A%0Aimport java.util.List;%0A%0Aimport org.openqa.selenium.By;%0Aimport org.openqa.selenium.Dimension;%0Aimport org.openqa.selenium.Point;%0Aimport org.openqa.selenium.WebElement;%0A%0A/**%0A * AnnotatedWebElement.java%0A *%0A * @author Zoltan Pazsit %3Cpazsitz@pazsitz.hu%3E%0A * @copyright Copyright (c) 2014, Zoltan Pazsit%0A */%0Apublic class AnnotatedWebElement implements WebElement %7B%0A%09private WebElement baseElement;%0A%09private DataTableAttributes fieldAnnotation;%0A%09%0A%09/**%0A%09 * wraps WebElement and the associated DataTableAttributes annotation%0A%09 * @param element%0A%09 * @param fieldAnnotation%0A%09 */%0A%09public AnnotatedWebElement(WebElement element, DataTableAttributes annotation) %7B%0A%09%09this.baseElement = element;%0A%09%09this.fieldAnnotation = annotation;%0A%09%7D%0A%09%0A%09/**%0A%09 * Gets the real WebElement%0A%09 * @return WebElement%0A%09 */%0A%09public WebElement getBaseElement() %7B%0A%09%09return baseElement;%0A%09%7D%0A%0A%09/**%0A%09 * Gets the WebElement - Field annotation%0A%09 * @return DataTableAttributes%0A%09 */%0A%09public DataTableAttributes getFieldAnnotation() %7B%0A%09%09return fieldAnnotation;%0A%09%7D%0A%0A%09@Override%0A%09public void click() %7B%0A%09%09baseElement.click();%0A%09%7D%0A%0A%09@Override%0A%09public void submit() %7B%0A%09%09baseElement.submit();%0A%09%7D%0A%0A%09@Override%0A%09public void sendKeys(CharSequence... keysToSend) %7B%0A%09%09baseElement.sendKeys(keysToSend);%0A%09%7D%0A%0A%09@Override%0A%09public void clear() %7B%0A%09%09baseElement.clear();%0A%09%7D%0A%0A%09@Override%0A%09public String getTagName() %7B%0A%09%09return baseElement.getTagName();%0A%09%7D%0A%0A%09@Override%0A%09public String getAttribute(String name) %7B%0A%09%09return baseElement.getAttribute(name);%0A%09%7D%0A%0A%09@Override%0A%09public boolean isSelected() %7B%0A%09%09return baseElement.isSelected();%0A%09%7D%0A%0A%09@Override%0A%09public boolean isEnabled() %7B%0A%09%09return baseElement.isEnabled();%0A%09%7D%0A%0A%09@Override%0A%09public String getText() %7B%0A%09%09return baseElement.getText();%0A%09%7D%0A%0A%09@Override%0A%09public List%3CWebElement%3E findElements(By findElements) %7B%0A%09%09return baseElement.findElements(findElements);%0A%09%7D%0A%0A%09@Override%0A%09public WebElement findElement(By by) %7B%0A%09%09return baseElement.findElement(by);%0A%09%7D%0A%0A%09@Override%0A%09public boolean isDisplayed() %7B%0A%09%09return baseElement.isDisplayed();%0A%09%7D%0A%0A%09@Override%0A%09public Point getLocation() %7B%0A%09%09return baseElement.getLocation();%0A%09%7D%0A%0A%09@Override%0A%09public Dimension getSize() %7B%0A%09%09return baseElement.getSize();%0A%09%7D%0A%0A%09@Override%0A%09public String getCssValue(String propertyName) %7B%0A%09%09return baseElement.getCssValue(propertyName);%0A%09%7D%0A%0A%7D%0A

add extended WebElement to store annotations