[arquillian-issues] [JBoss JIRA] (ARQGRA-438) Using multiple qualifiers for @Page

Lukáš Fryč (JIRA) issues at jboss.org
Mon Sep 22 08:00:21 EDT 2014


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

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

[~smikloso] currently a Graphene handler is injected with static knowledge about the injection point - i.e. it knows what qualifier and what type was requested.

You would need to change this knowledge on per-test basis, i.e. before {{test()}} proceeds, you need to set up that SomePage should use @OperatesOnDeployment.

TBH I don't believe this feature is enough needed to support it,

but I would certainly help you if it is big enough for you that you would like to implement it at own and contribute it to Graphene.

> Using multiple qualifiers for @Page
> -----------------------------------
>
>                 Key: ARQGRA-438
>                 URL: https://issues.jboss.org/browse/ARQGRA-438
>             Project: Arquillian Graphene
>          Issue Type: Enhancement
>          Components: core
>    Affects Versions: 2.1-Tracking
>            Reporter: Stefan Miklosovic
>            Priority: Optional
>
> In case I have one application deployed to multiple devices (apks to Android) and I use @Page abstraction, I end up with this:
> {code}
> @Drone @Mobile AndroidDriver mobile;
> @Drone @Tablet AndroidDriver tablet;
> @Page @Mobile SomePage mobilePage;
> @Page @Tablet SomePage tabletPage;
> {code}
> Event that page is same I have to declare it twice. It could be done as
> {code}
> @Page @Mobile @Tablet SomePage page;
> {code}
> In this case, there has to be some distinction between webdrivers and it seems this could be done on deployment level when you use @OperatesOnDeployment annotaion on webdriver injection. In case you have some test method which uses the same @OperatesOnDeployment value, Graphene will inject "right" driver to handle that @Page bean.
> Example:
> {code}
> @Drone @Tablet @OperatesOnDeployment("android_1") AndroidDriver tablet;
> @Drone @Mobile @OperatesOnDeployment("android_2") AndroidDriver mobile;
> @Page @Tablet @Mobile SomePage somePage;
> @Test
> @OperatesOnDeployment("android_1")
> public void test()
> {
>     somePage will be backed by @Tablet browser
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)



More information about the arquillian-issues mailing list