mibutec / popperfw

Declarative PageObjects for Java
Apache License 2.0
3 stars 3 forks source link

[FEATURE] Support for recuring PO interaction in web #6

Open mibutec opened 7 years ago

mibutec commented 7 years ago

For now when you want to access some global information of a PO (like is PO visible), you need to add an annotated method to that PO. That's quite clumsy, since that information is necessary for almost any PO.

A much better way would be to have a helper class extracting that global information out of POs, i.e.

boolean PoHelper.isDisplayed(Object po);
WebElement PoHelper.extractWebElement(Object po);

A special helper method is support for accessing empty lists. Since webdriver implys an empty list to be not finished, it waits whole implicit timeout until releasing an empty List. In some (most) cases thats unwanted behavior.

List<Po> PoHelper.expectEmptyList(SomeListReference listReference);