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

    Function discoverPage

    • Discovers all UI5 controls on the current Playwright page.

      Parameters

      • page: DiscoveryPage

        Playwright Page instance (or any structural equivalent).

      • options: DiscoverPageOptions = {}

        Optional filtering and timeout options.

      Returns Promise<AiResponse<PageContext>>

      AiResponse<PageContext>'success' with a full snapshot or 'error' with a recoverable error payload.

      Calls sap.ui.core.ElementRegistry.all() (UI5 ≥ 1.106) in the browser, falling back to sap.ui.getCore().mElements for older runtimes. Each discovered control is classified by interactivity, container membership, and object category. The result is partitioned into buttons, formFields, tables, and navigationElements for convenient AI consumption.

      The browser-side script is serialized via fn.toString() — module-level imports are not available in the browser callback.

      Enumerate all UI5 controls for AI-driven selector generation.

      ui5-bulk-discovery

      All

      import { discoverPage } from '#ai/bulk-discovery.js';

      // Basic usage
      const response = await discoverPage(page, { interactiveOnly: true });
      if (response.status === 'success') {
      logger.info(`${response.data.controls.length} controls found`);
      }

      // With pagination
      const paged = await discoverPage(page, { limit: 20, offset: 40 });