[arquillian-issues] [JBoss JIRA] (ARQGRA-199) Provide a way to create Page Fragments dynamically
Juraj Húska (JIRA)
jira-events at lists.jboss.org
Wed Dec 12 10:33:17 EST 2012
[ https://issues.jboss.org/browse/ARQGRA-199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740943#comment-12740943 ]
Juraj Húska edited comment on ARQGRA-199 at 12/12/12 10:33 AM:
---------------------------------------------------------------
As we discussed offline, we decided to support for now:
{code}
@FindBy
TabPanel panel;
public void test() {
Tab tab1 = panel.switchTo(1);
UserDetials usrDet = tab1.getContent(UserDetails.class);
}
{code}
There was an proposition for the future:
{code}
@FindBy
TabPanel panel;
@Content(item = 1)
UserDetails details;
public void test() {
panel.switchTo(details);
}
{code}
Which unfortunately does not solve the problem with the state when there are more {{@FindBy}} fields on the page, and it is not clear with which {{panel}} or {{@FindBy}} the {{@Content}} is associated.
Then I had this suggestion which start to be however a little ugly:
{code}
@FindBy
@DynamicPanel(1)
TabPanel panel1;
@FindBy
@DynamicPanel(2)
TabPanel panel2
@Content(item = 1)
@DynamicPanel(1)
UserDetails details;
@Content
@DynamicPanel(2)
WebElement text;
public void test() {
panel.switchTo(details);
}
{code}
was (Author: jhuska):
As we discussed offline, we decided to support for now:
{code}
@FindBy
TabPanel panel;
public void test() {
Tab tab1 = panel.switchTo(1);
UserDetials usrDet = tab1.getContent(UserDetails.class);
}
{code}
There was an proposition for the future:
{code}
@FindBy
TabPanel panel;
@Content(item = 1)
UserDetails details;
public void test() {
panel.switchTo(details);
}
{code}
Which unfortunately does not solve the problem with the state when there are more {{@FindBy}} fields on the page, and it is not clear with which {{panel}} or {{@FindBy}} the content is associated.
Then I had this suggestion which start to be however a little bit messy:
{code}
@FindBy
@DynamicPanel(1)
TabPanel panel1;
@FindBy
@DynamicPanel(2)
TabPanel panel2
@Content(item = 1)
@DynamicPanel(1)
UserDetails details;
@Content
@DynamicPanel(2)
WebElement text;
public void test() {
panel.switchTo(details);
}
{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