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

Support for enriching by Page Objects and Page Fragments declared as nested classes

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 2.0.0.Alpha2
    • Fix Version/s: 2.0.0.Alpha3
    • Component/s: core, ftest
    • Labels:
      None

      Description

      This approach can be used for inner classes:

      Class<?> outerClass = declaredClass.getDeclaringClass();
      
                      // check whether declared page object is not nested class
                      if (outerClass != null) {
                          Constructor<?> construtor = declaredClass.getDeclaredConstructor(new Class[] { outerClass });
                          page = construtor.newInstance(new Object[] { outerClass.newInstance() });
                      } else {
                          page = declaredClass.newInstance();
                      }
      

      There is need for finding way of initializing static nested classes.

      It has to be done both for Page Objects and Page Fragments initialization.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: