Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Class FETestLibraryInstance

    Stateful FE Test Library instance for OPA5 test execution.

    Created exclusively by initializeFETestLibrary. Manages the lifecycle of OPA5 page objects and provides the execute() method for running Given/When/Then chains against the browser.

    P1 exception: This is a stateful class (manages initialized state, WorkZone detection, and method call history).

    const fe = await initializeFETestLibrary(page, config);
    const logs = await fe.execute(({ Given, When, Then }) => {
    When.onTheMainPage.onFilterBar().iChangeSearchField('test');
    Then.onTheMainPage.onFilterBar().iCheckSearchField('test');
    });
    Index

    Accessors

    • get isInitialized(): boolean

      Whether the FE test library has been initialized.

      Returns boolean

      if (fe.isInitialized) { ... }
      

    Methods

    • Executes a Given/When/Then chain against the browser OPA5 queue.

      Parameters

      • fn: (scope: { Given: unknown; Then: unknown; When: unknown }) => void

        Function receiving Given/When/Then proxy objects

      Returns Promise<readonly string[]>

      Array of OPA5 assertion log messages

      const logs = await fe.execute(({ Given, When, Then }) => {
      When.onTheMainPage.onFilterBar().iChangeSearchField('test');
      });
    • Returns the method calls captured during the last execute() invocation.

      Returns readonly ProxyMethodCall[]

      Captured proxy method calls, or empty array if never executed

      await fe.execute(({ When }) => { When.onTheMainPage.onTable().iSelectRow(0); });
      const history = fe.getMethodCallHistory();
    • Returns the configured page object keys.

      Returns readonly string[]

      Array of page keys (e.g., ['onTheMainPage', 'onTheDetailPage'])

      const keys = fe.getPageKeys(); // ['onTheMainPage']
      
    • Returns the shell instance if WorkZone was detected, otherwise undefined.

      Returns WorkZoneDetection | undefined

      Shell detection info or undefined

      const shell = fe.getShellInstance();
      if (shell) { ... }
    • Switches context to the application frame (WorkZone only).

      Returns void

      fe.toApp();
      
    • Switches context to the shell frame (WorkZone only).

      Returns void

      fe.toShell();