Here is how to extend the WebElementFacade:
1) Create interface
@ImplementedBy(MyInputImpl.class) public interface MyInput extends WebElementFacade { public void doSomething(); }
2) Create implementation
public class MyInputImpl extends WebElementFacadeImpl implements MyInput { public MyInputImpl(WebDriver driver, ElementLocator locator, int timeout){ super(driver, locator, timeout); } public void doSomething(){ element.type("done"); }
3) Use it
public class MyPage extends PageObject { @FindBy(jquery = "#myelement") public MyInput myInput; }
Let me know if you have any problems with it.
Alex
--
You received this message because you are subscribed to the Google Groups "Thucydides Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send an email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
What Selenium version are you using?
Yes, you need a constructor for the MyPage.
Public MyPage(WebDriver driver) { super(driver); }