[arquillian-issues] [JBoss JIRA] (ARQGRA-189) Support @Page in Page objects

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Tue Sep 11 05:25:32 EDT 2012


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

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

Agree, this is completely valid use case. Scheduling to {{2.0.0.Alpha3}}.
                
> Support @Page in Page objects
> -----------------------------
>
>                 Key: ARQGRA-189
>                 URL: https://issues.jboss.org/browse/ARQGRA-189
>             Project: Arquillian Graphene
>          Issue Type: Feature Request
>    Affects Versions: 2.Future
>            Reporter: Anthony O.
>            Assignee: Lukáš Fryč
>             Fix For: 2.0.0.Alpha3
>
>
> Here is my use case : I've got a home page which when I click on a link in the menu will redirect me to that feature page.
> I want to code fluently, so that my test would like this :
> {code}
> public class FeatureTest extends Arquillian {
> 	@Drone
> 	private WebDriver driver;
> 	@Page
> 	private HomePage homePage;
> 	@Test
> 	public testClickMenuRedirect() {
> 		FeaturePage featurePage = homePage.open(driver)
> 			.openFeaturePageByMenu()
> 			.doFeature();
> 		assertEquals(featurePage.getSomeAttributeValue(), "someAttributeValue");
> 	}
> }
> public class HomePage {
> 	@Page
> 	private FeaturePage featurePage;
> 	@FindBy(id="featureLinkMenu")
> 	private WebElement featureLinkMenu;
> 	public HomePage open(WebDriver driver) {
> 		driver.get("someUrl");
> 	}
> 	public FeaturePage openFeaturePageByMenu() {
> 		guardHttp(featureLinkMenu).click();
> 		return featurePage;
> 	}
> }
> {code}
> It could be implemented with a cache which would create only one instance by Page class for each @Page on the root of the @Test ...

--
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