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

Support @Drone and @ArquillianResource in Page objects

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    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()
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpapouse Jan Papousek (Inactive)
              Reporter:
              aogier Anthony O. (Inactive)
              Archiver:
              samahaja Sagar Mahajan

                Dates

                Created:
                Updated:
                Resolved:
                Archived: