Uploaded image for project: 'Arquillian Graphene'
  1. Arquillian Graphene
  2. ARQGRA-191

Support @Drone and @ArquillianResource in Page objects

    Details

      Description

      In the same way as ARQGRA-189, I think it could be a good thing to support @Drone in Page objects too.

      Here is my use case :

      public class FeatureTest extends Arquillian {
      	@Page
      	private HomePage homePage;
      
      	@Test
      	public testClickMenuRedirect() {
      		FeaturePage featurePage = homePage.open()
      			.doFeature();
      		assertEquals(featurePage.getSomeAttributeValue(), "someAttributeValue");
      	}
      }
      
      public class HomePage {
      	@Drone
      	private WebDriver driver;
      
      	@ArquillianResource
      	URL contextPath;
      
      	@FindBy(id="featureLinkMenu")
      	private WebElement featureLinkMenu;
      
      	public HomePage open() {
      		driver.get(URLUtils.buildUrl(contextPath, "pages/feature.xhtml");
      	}
      
      	public HomePage doFeature() {
      		guardHttp(featureLinkMenu).click();
      		return this;
      	}
      
      	// code for getSomeAttributeValue()
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jpapouse Jan Papousek
                  Reporter:
                  aogier Anthony O.
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: