[arquillian-issues] [JBoss JIRA] (ARQGRA-199) Provide a way to create Page Fragments dynamically

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Mon Nov 5 09:16:19 EST 2012


    [ https://issues.jboss.org/browse/ARQGRA-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731789#comment-12731789 ] 

Lukáš Fryč commented on ARQGRA-199:
-----------------------------------

{code:java}
class MyTabPanel extends TabPanel {
   
   @Item(1)
   private UserDetails details;

   @Item(2)
   private WebElement;

   @Item(3)
   private Calendar;

   public UserDetails getUserDetails() {
      return details;
   }
}

TabPanel extends DynamicPanel {
   // X = UserDetails
   X switchTo(X );

   @FindBy(".item")
   List<WebElement> items;

   WebElement getNthPanel(int n) {
       return items.get(n);
   }
}

UserDetails details = myTabPanel.switchTo(UserDetails.class);
{code}
                
> Provide a way to create Page Fragments dynamically
> --------------------------------------------------
>
>                 Key: ARQGRA-199
>                 URL: https://issues.jboss.org/browse/ARQGRA-199
>             Project: Arquillian Graphene
>          Issue Type: Enhancement
>          Components: api, unit-test
>    Affects Versions: 2.0.0.Alpha2
>            Reporter: Juraj Húska
>            Assignee: Juraj Húska
>             Fix For: 2.0.0.Alpha3
>
>
> The only way now to declare and initialize Page Fragment is to annotate the implementation class of that Page Fragment by {{@FindBy}} (or use static factory method).
> It will nice and vital addition to have way how to declare and create Page Fragments dynamically.
> It will be for example useful in the use case described in the [comment|https://issues.jboss.org/browse/ARQGRA-199?focusedCommentId=12731165&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12731165] below.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the arquillian-issues mailing list