Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Function serializeUI5SelectorToCSS

    • Converts a structured UI5Selector into a CSS-like pseudo-class selector string.

      Parameters

      Returns string

      The CSS-like pseudo-class selector string

      selectors.serializeUI5SelectorToCSS

      This is the inverse of what the CSS selector engine parses. The output format uses pseudo-class syntax like :type(sap.m.Button):prop(text, "Save").

      import { serializeUI5SelectorToCSS } from './selector-parser.js';

      const css = serializeUI5SelectorToCSS({
      controlType: 'sap.m.Button',
      id: 'saveBtn',
      properties: { text: 'Save' },
      ancestor: { controlType: 'sap.m.Panel' },
      });
      // ':type(sap.m.Button)#saveBtn:prop(text, "Save"):ancestor(:type(sap.m.Panel))'