Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.Future
    • Fix Version/s: 2.0.0.Alpha3
    • Component/s: None
    • Labels:
      None

      Description

      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 :

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

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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jhuska Juraj Húska
                Reporter:
                aogier Anthony O.
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: