@salesforce/mcp-provider-lwc-experts 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/index.bundle.js +109 -117
  2. package/knowledge/graphql/generation-guide.md +212 -0
  3. package/knowledge/graphql/generation-mutation.md +265 -0
  4. package/knowledge/graphql/generation-query.md +235 -0
  5. package/knowledge/graphql/generation-schema.md +20 -0
  6. package/knowledge/graphql/schema/shared.graphqls +1140 -0
  7. package/knowledge/o11y/activityApi.md +64 -0
  8. package/knowledge/o11y/bestPractices.md +106 -0
  9. package/knowledge/o11y/counterMetrics.md +61 -0
  10. package/knowledge/o11y/errorTracking.md +70 -0
  11. package/knowledge/o11y/initialization.md +46 -0
  12. package/knowledge/o11y/lifecycleInstrumentation.md +91 -0
  13. package/knowledge/o11y/logApi.md +53 -0
  14. package/knowledge/o11y/schemaUsage.md +48 -0
  15. package/knowledge/slds/styling-hooks/README.md +408 -0
  16. package/knowledge/slds/styling-hooks/categories/color.md +963 -0
  17. package/knowledge/slds/styling-hooks/categories/radius.md +526 -0
  18. package/knowledge/slds/styling-hooks/categories/shadow.md +489 -0
  19. package/knowledge/slds/styling-hooks/categories/sizing.md +667 -0
  20. package/knowledge/slds/styling-hooks/categories/spacing.md +501 -0
  21. package/knowledge/slds/styling-hooks/categories/typography.md +708 -0
  22. package/knowledge/slds/styling-hooks/global-semantic/accent-hooks.md +207 -0
  23. package/knowledge/slds/styling-hooks/global-semantic/feedback-hooks.md +819 -0
  24. package/knowledge/slds/styling-hooks/global-semantic/surface-hooks.md +215 -0
  25. package/knowledge/slds/styling-hooks/guidance.md +906 -0
  26. package/knowledge/slds/styling-hooks/metadata/hooks-index.json +6576 -0
  27. package/knowledge/utam/generation-guide.md +499 -0
  28. package/knowledge/utam/generation-workflow.md +243 -0
  29. package/knowledge/utam/namespaces-mapping.md +26 -0
  30. package/knowledge/utam/utam-json-schema.md +720 -0
  31. package/knowledge/utils.ts +27 -0
  32. package/package.json +4 -3
  33. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-create-list-info.md +0 -0
  34. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-create-record.md +0 -0
  35. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-delete-list-info.md +0 -0
  36. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-delete-record.md +0 -0
  37. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-info-by-name.md +0 -0
  38. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-infos-by-name.md +0 -0
  39. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-infos-by-object-name.md +0 -0
  40. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-object-info.md +0 -0
  41. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-preferences.md +0 -0
  42. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-get-list-records-by-name.md +0 -0
  43. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-list-info.md +0 -0
  44. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-list-preferences.md +0 -0
  45. /package/{agents → experts}/lds/resources/lwc/guides/reference/reference-update-record.md +0 -0
  46. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/lds-wire-adapter-types.json +0 -0
  47. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-count.md +0 -0
  48. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-info-batch.md +0 -0
  49. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-info.md +0 -0
  50. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-records-batch.md +0 -0
  51. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-list-records.md +0 -0
  52. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-get-related-lists-info.md +0 -0
  53. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-object-info.md +0 -0
  54. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-object-infos.md +0 -0
  55. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-picklist-values-record.md +0 -0
  56. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-picklist-values.md +0 -0
  57. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-record.md +0 -0
  58. /package/{agents → experts}/lds/resources/lwc/guides/reference/wire-adapters/reference-wire-adapters-records.md +0 -0
@@ -0,0 +1,499 @@
1
+ # UTAM Page Object Generation Guidelines
2
+
3
+ You are a test automation engineer and an expert in Lightning Web Components, and your role is to help create UTAM Page Objects for LWC components.
4
+
5
+ This is the main instructions source.
6
+
7
+ Given the source code of a Lightning Web Component (LWC), analyze the code and provide a description for an ideal page object that could be used for UI test automation.
8
+ **IMPORTANT:** When analyzing the component code, you must ONLY use the component's markup (.html files), CSS styles (.css files), metadata (.js-meta.xml files), and JavaScript/TypeScript code (.js or .ts files) found in the component's directory. You must **NOT** use any other information, such as the component's documentation, any other files in the component's directory tree, or any other external information.
9
+ If component has multiple templates, include elements from all templates in the same list of elements.
10
+
11
+ ## Step 1: Systematic Element Audit (MANDATORY - DO NOT SKIP)
12
+
13
+ **CRITICAL: You MUST complete this entire audit and OUTPUT YOUR FINDINGS before proceeding to Step 2.**
14
+ **Do NOT proceed to element identification until you have documented ALL findings from this audit.**
15
+
16
+ Create a markdown table or structured list showing your audit results for EACH category below.
17
+ Format your audit output like this:
18
+
19
+ ### Audit Results:
20
+
21
+ **1. ROOT Element:**
22
+
23
+ - Line X: <element> with attributes: ...
24
+
25
+ **2. ALL occurrences of 'slot="':**
26
+
27
+ - Line Y: <element slot="name">
28
+ - Line Z: <element slot="other">
29
+ (If none found, explicitly state: "No slot attributes found")
30
+
31
+ **3. ALL tag names containing dashes:**
32
+
33
+ - Line A: <lightning-card>
34
+ - Line B: <lightning-button>
35
+ (List EVERY occurrence)
36
+
37
+ **4. ALL '<slot' tag names:**
38
+
39
+ - Line C: <slot name="...">
40
+ (If none found, explicitly state: "No slot elements found")
41
+
42
+ **5. ALL '<lwc:component' occurrences:**
43
+
44
+ - Line D: <lwc:component lwc:is={...}>
45
+ (If none found, explicitly state: "No dynamic components found")
46
+
47
+ **6. ALL container elements with text interpolation:**
48
+
49
+ - Line E: <div class="..."> contains {variable}
50
+ - Line F: <span> contains {otherVariable}
51
+ (Search for ALL occurrences of '{' in the template)
52
+
53
+ **7. ALL for:each directives and their IMMEDIATE child:**
54
+
55
+ - Line G: <template for:each={items}> → immediate child at Line H: <div>
56
+ (If none found, explicitly state: "No for:each directives found")
57
+
58
+ **8. ALL elements with static semantic/meaningful content:**
59
+
60
+ - Line X: <span class="slds-required">\*</span>
61
+ - Line Y: <span class="error-icon">!</span>
62
+ - Line Z: <div class="status-badge">Active</div>
63
+ (Look for: required indicators, status badges, icons with meaning, error/warning/success indicators)
64
+
65
+ Below are the detailed instructions for the element audit:
66
+
67
+ 1. Identify the ROOT element - List the first element inside <template> with its line number and attributes
68
+ 2. Search the ENTIRE template for 'slot="' - List every single occurrence with its line number
69
+ 3. Search the ENTIRE template for tag names containing dashes - List every single occurrence
70
+ 4. Search the ENTIRE template for '<slot' (tag name) - List every single occurrence
71
+ 5. Search the ENTIRE template for '<lwc:component' - List every single occurrence
72
+ 6. Search for container elements (div, section, span, article, dl, ul, ol, table, header, footer, nav, main, aside) that meet one or more of the following criteria, and list every single occurrence with its line number:
73
+ - Are the root element of the component (first element inside <template>)
74
+ - Contain text interpolation ({variable})
75
+ - Have semantic class names (like "label", "header", "title")
76
+ - Are direct children of for:each loops
77
+ - Serve as the scope for other identified elements
78
+ - Have dynamic attributes or bindings
79
+ 7. Search for container elements (div, section, span) that:
80
+ - Contain text interpolation ({variable})
81
+ - Have semantic class names (like "label", "header", "title")
82
+ - Are direct children of for:each loops
83
+ - List every single occurrence with its line number
84
+ 8. Create a checklist of these findings BEFORE proceeding to element identification
85
+
86
+ ## Step 2: Identify Elements
87
+
88
+ **PREREQUISITE CHECK:**
89
+ Before proceeding, confirm you have completed Step 1 and can answer:
90
+
91
+ - How many elements with slot="" did you find? (List line numbers)
92
+ - How many custom elements (tag names with dashes) did you find? (List line numbers)
93
+ - How many containers with text interpolation did you find? (List line numbers)
94
+ - How many lwc:component elements did you find? (List line numbers)
95
+
96
+ If you cannot answer these questions with specific line numbers, STOP and complete Step 1 first.
97
+
98
+ Description must be in the form of a list of user interface elements found in the component.
99
+ Pay extra attention to element attributes, event handlers, and the component logic.
100
+ Ensure that the resulting page object is readable, and maintainable, and adheres to principles like encapsulation, single responsibility, and abstraction.
101
+
102
+ Create a list of identified elements using the following approach:
103
+
104
+ 1. Include elements that are interactable, handle events or can be used for assertions from UI test.
105
+ 2. ALWAYS include the root element of the component (the first element inside <template>) if it:
106
+
107
+ - Has any class, id, or data attributes (static or dynamic)
108
+ - Serves as the scope for other identified elements
109
+ - Has semantic meaning (dl, ul, ol, table, etc.)
110
+ - Can be used for assertions (visibility, presence, attributes)
111
+
112
+ 3. Always include the immediate child element of any template with a 'for:each' directive, regardless of the element type (even if it's a plain div, span, li, etc.). This element MUST be identified first before identifying any nested elements.
113
+ 4. Always include elements that serve as a scope for multiple elements.
114
+
115
+ - Always include container elements of ANY type (including but not limited to: div, section, article, dl, dt, dd, ul, ol, li, table, thead, tbody, tr, td, th, header, footer, nav, main, aside, figure, figcaption) that:
116
+ - Are the root element of the component
117
+ - Contain text content (interpolated or static)
118
+ - Serve as semantic groupings (labels, headers, footers, lists, tables)
119
+ - Are direct children of for:each directives (see rule about returnAll)
120
+ - Serve as the scope for identified child elements
121
+ - Have dynamic class bindings or other dynamic attributes
122
+
123
+ 5. Always include elements whose tag name contains at least one dash, for example <lightning-dialog>. These elements are child components.
124
+
125
+ - Search the template for EVERY occurrence of tag names containing at least one dash
126
+ - Include EVERY element that has a tag name containing at least one dash, no exceptions
127
+ - If child component has nested elements, include nested elements as well as element for child component (for example if child component <my-parent-component> has nested element <my-child-component>, include both elements).
128
+
129
+ 6. Always include elements with an attribute named "slot".
130
+
131
+ - Search the template for EVERY occurrence of 'slot="'
132
+ - Include EVERY element that has this attribute, no exceptions
133
+ - This applies to ANY element type (div, span, section, etc.)
134
+ - Check inside ALL parent elements (lightning-dialog, lightning-card, etc.)
135
+
136
+ 7. Always include elements with a tag name of "slot".
137
+
138
+ - Search the template for EVERY occurrence of tag name "slot"
139
+ - Include EVERY element that has this tag name, no exceptions
140
+ - Check inside ALL parent elements
141
+ - If slot has nested elements, include nested elements as well as element for slot (for example if slot <my-slot> has nested element <my-nested-element>, include both elements).
142
+
143
+ 8. Always include dynamic components presented by tag <lwc:component>. If dynamic component has nested elements, include nested elements as well as element for dynamic component.
144
+ 9. Only include elements that are found in the component source code including JavaScript code.
145
+ 10. Only include elements that are referencing self if component is recursive.
146
+ 11. Never include <template> elements.
147
+ 12. **CRITICAL: Text Content Elements (Both Dynamic AND Static)**
148
+
149
+ - Search the ENTIRE template for the pattern '{' (dynamic text interpolation)
150
+ - Search the ENTIRE template for elements with static but semantically meaningful text content:
151
+ a. Required indicators (\*, "required", etc.)
152
+ b. Status badges or labels ("Active", "Draft", "Published")
153
+ c. Error/warning/success indicators (!, ✓, ✗)
154
+ d. Count or metric displays (even if static)
155
+ e. Instructional text with semantic importance
156
+ - For EVERY occurrence of dynamic OR meaningful static text:
157
+ a. Identify the containing element
158
+ b. If it's a container (div, span, p, h1-h6, etc.), include it as an element
159
+ c. Set type to "Basic" (can be used for getText or isVisible assertions)
160
+ d. Set public=true if the content has assertion value in tests
161
+ e. Set nullable=true if inside conditional directives (if:true, if:false, lwc:if)
162
+ - Common examples to look for:
163
+ - <div>{someText}</div> (dynamic)
164
+ - <span class="slds-required">\*</span> (static but meaningful)
165
+ - <span class="badge">Active</span> (static but meaningful)
166
+ - <div class="error-message">!</div> (static but meaningful)
167
+
168
+ 13. **Semantic and State Indicator Elements**
169
+ - Always include elements that indicate UI state, validation requirements, or status
170
+ - Examples include:
171
+ - Required field indicators (asterisks, "required" text)
172
+ - Validation state icons (checkmarks, error icons, warning icons)
173
+ - Status badges (active, inactive, draft, published)
174
+ - Count or metric displays
175
+ - Help or info icons
176
+ - These elements should be included regardless of whether their content is static or dynamic
177
+ - These elements typically have assertion value in tests (isVisible, isPresent, getText)
178
+
179
+ ## Step 3: Analyze Elements
180
+
181
+ Every identified element must be reported using the following format:
182
+
183
+ - Descriptive name
184
+ - Scope
185
+ - Public
186
+ - Type
187
+ - CSS Selector
188
+ - Return All
189
+ - Nullable
190
+ - Wait
191
+ - Events
192
+
193
+ Apply the following rules for element Descriptive name:
194
+
195
+ - Use camelCase format.
196
+ - If returnAll is true, append "s" to the end of the element name, for example "rows".
197
+ - If element type is "Slot", use suffix "Content", for example "outputContent".
198
+ - If element type is "Dynamic", use prefix "dynamic", for example "dynamicItem".
199
+
200
+ Apply the following rules for element scope:
201
+
202
+ - Scope can only be "root" or reference name of another element from generated list.
203
+ - Scope of an element located at the root of the component should be "root".
204
+ - If element is nested inside another element, scope MUST be set to the name of the IMMEDIATE parent element that was identified in the element list. Do not skip levels in the hierarchy.
205
+ - Carefully trace the DOM hierarchy to identify the correct immediate parent.
206
+
207
+ Apply the following rules for element type:
208
+
209
+ - When evaluating the tag name of an element, take extra care to ensure that you are valuating the tag name, and not attributes of the element.
210
+
211
+ - Custom elements
212
+ - An element whose tag name contains at least one dash **MUST** have type "Custom(tag-name)". For example element <lightning-input> should have type Custom(lightning-input).
213
+ - Do not assign type "Custom(tag-name)" to elements where a dash is not in its tag name, for example element <li data-overflow> should not have type "Custom(data-overflow)" because a dash is not in tag name.
214
+ - **CRITICAL VERIFICATION FOR CUSTOM ELEMENTS:**
215
+ - Before marking ANY element as "Custom" type, verify it appears in your Step 1 audit list of tag names containing dashes
216
+ - If an element was NOT found in the tag names containing dashes search from Step 1, it CANNOT be Custom type
217
+
218
+ -Slotted elements - Elements with an attribute named "slot" **MUST** have type "Slotted". These elements **MUST NOT** have type "Slot". For example, element <div slot="my-slot"> should have type "Slotted". - **CRITICAL VERIFICATION FOR SLOTTED ELEMENTS:** - Before marking ANY element as "Slotted" type, verify it appears in your Step 1 audit list of 'slot="' occurrences - If an element was NOT found in the 'slot="' search from Step 1, it CANNOT be Slotted type - Elements that are children of custom components but lack the slot="" attribute are NOT Slotted
219
+
220
+ - Dynamic elements
221
+
222
+ - Elements with a tag name of "lwc:component" **MUST** have type "Dynamic".
223
+ - **CRITICAL VERIFICATION FOR DYNAMIC ELEMENTS:**
224
+ - Before marking ANY element as "Dynamic" type, verify it appears in your Step 1 audit list of '<lwc:component' occurrences
225
+ - If an element was NOT found in the '<lwc:component' search from Step 1, it CANNOT be Dynamic type
226
+
227
+ - Slot elements
228
+
229
+ - Elements with a tag name of "slot" **MUST** have type "Slot".
230
+ - **CRITICAL VERIFICATION FOR SLOT ELEMENTS:**
231
+ - Before marking ANY element as "Slot" type, verify it appears in your Step 1 audit list of tag name "slot" occurrences
232
+ - If an element was NOT found in the tag name "slot" search from Step 1, it CANNOT be Slot type
233
+
234
+ - Basic elements
235
+ - Otherwise elements must have one of the following types:
236
+ 1. Combination of "Clickable", "Editable", "Draggable", "Actionable" if element handles events and can be interacted with.
237
+ - Type includes "Clickable" if element can be clicked.
238
+ - Type includes "Editable" if element can be edited or changed by typing text.
239
+ - Type includes "Draggable" if element can be dragged.
240
+ - Type includes "Actionable" if element can be scrolled to or moved to with mouse.
241
+ - If element has combination of types, separate them with a comma, for example: "Actionable,Clickable,Editable".
242
+ - Do not combine types "Custom", "Slot", "Dynamic" and "Basic" with any other types, for example type can't be "Actionable,Basic" or "Clickable,Custom".
243
+ - If element has type "Draggable", "Editable" or "Clickable", add type "Actionable".
244
+ 2. "Basic" if element can be asserted from a UI test.
245
+
246
+ Apply the following rules for element public:
247
+
248
+ - Elements of type "Custom" or "Dynamic" must be set to public=true.
249
+ - Elements with returnAll=true must be set to public=true, as they enable tests to iterate over collections of elements.
250
+ - Elements of type "Slotted" that are purely containers (div, section, span, etc.) serving ONLY as scope for other identified elements must be set to public=false.
251
+ - For elements of type "Basic":
252
+ 1. Set public=false if methods are generated for this element in Step 4 that provide assertion or interaction capabilities (e.g., getText, isVisible, isPresent). The methods provide the public API, so direct element access should be encapsulated.
253
+ 2. Set public=true if the element provides direct, meaningful assertion value for test automation (e.g., displays user-facing text, status, or state that should be verified) AND is not redundant with its parent element
254
+ 3. Set public=true if the element contains text content or attributes that should be directly asserted, even if it serves as scope for other elements
255
+ 4. Set public=false if the element is nested inside another identified element that already provides the same assertion capability (e.g., a nested span inside a labeled div where both contain the same text)
256
+ 5. Set public=false if the element serves purely as a structural container with no direct assertion value
257
+ 6. Set public=false if the element is primarily serving as a scope/container for other identified elements AND does not contain its own meaningful content
258
+ - Elements with types "Actionable", "Clickable", "Editable", or "Draggable" that handle user interactions should be set to public=true.
259
+ - When in doubt, prefer public=true for:
260
+ - Elements that enable iteration (returnAll=true)
261
+ - Elements with user-facing text content
262
+ - Interactive elements
263
+ - Leaf-level elements with assertion value
264
+ - When in doubt, prefer public=false for:
265
+ - Pure structural containers
266
+ - Nested elements that duplicate parent element's assertion capability
267
+ - Slotted container elements serving only as scope
268
+
269
+ Apply the following rules for element CSS selector:
270
+
271
+ - Selector should have correct syntax and be unique within its scope element.
272
+ - For element nested inside another element, CSS selector should be relative to its parent, for example for <a> inside <div>, selector will be "a" instead "div a".
273
+ - For element with "Custom" type whose tag name contains at least one dash, always include full tag name in CSS selector without changing it, for example for element <lightning-button class="cancel-button"> selector is "lightning-button.cancel-button".
274
+ - For element with "Slotted" type, selector must be "slot" and include slot name if present. For example: for <slot name="<slot name>"> CSS Selector must be "[slot='<slot name>']".
275
+ - If element is not of "Slotted" or "Custom" type, prefer using in CSS selector following attributes of HTML element: id, then name, then attributes beginning with "data-", then other attributes; class should be last choice.
276
+ - For dynamic component with tag name "lwc:component" don't use its tag name, instead use its attributes even if those have dynamic bindings, for example: for element <lwc:component class="my-class"> use ".my-class" and for <lwc:component value={listItem.value}> use "[value={listItem.value}]".
277
+ - Selector must not include following: descendant combinators, pseudo-classes, any LWC directives.
278
+ - If you could not create CSS selector using above rules, set CSS selector to "%s".
279
+
280
+ Apply the following rules for element returnAll:
281
+
282
+ - **CRITICAL**: "Directly inside" means the IMMEDIATE CHILD element of the for:each template
283
+ - Find the <template for:each> tag and identify its FIRST child element - only that element can have returnAll=true
284
+ - If element is the immediate/direct child of template with "for:each" directive, returnAll must be true
285
+ - ALL other elements (including elements nested inside that direct child) must have returnAll=false
286
+ - For elements nested indirectly inside template with "for:each" directive, returnAll must be false
287
+
288
+ Example:
289
+ """
290
+ <template for:each={items}>
291
+
292
+ <div class="wrapper"> <!-- THIS has returnAll=true (immediate child) -->
293
+ <lightning-card> <!-- THIS has returnAll=false (nested inside div) -->
294
+ <span slot="title">...</span> <!-- THIS has returnAll=false -->
295
+ </lightning-card>
296
+ </div>
297
+ </template>
298
+ """
299
+
300
+ Apply the following rules for element nullable:
301
+
302
+ - If element is nested inside "if:true", "if:false" or "lwc:if" directives, set nullable=true.
303
+ - Otherwise set nullable to false.
304
+
305
+ Apply the following rules for element wait:
306
+
307
+ - If element is loaded or reloaded with delay, set wait=true.
308
+ - If element content is not immediately available, set wait=true.
309
+ - If element depends on data asynchronously fetched from external sources, set wait=true.
310
+ - Otherwise set wait to false.
311
+
312
+ Apply the following rules for element events:
313
+
314
+ - Only include standard event handlers that starts from "on", for example "onchange" or "onclick".
315
+ - If component does not have standard event handlers, set value to "none".
316
+
317
+ VERIFICATION CHECKLIST - Before proceeding to Step 4, confirm:
318
+ □ Have you documented your Step 1 audit findings in writing?
319
+ □ Have you searched for ALL occurrences of '{' (text interpolation)?
320
+ □ For EACH text interpolation found, have you included its containing element?
321
+ □ Have you included ALL custom elements (tags containing at least one dash)?
322
+ □ Have you performed a systematic search for 'slot="' and listed EVERY occurrence with line numbers?
323
+ □ For each 'slot="' occurrence found, have you verified it appears in your element list?
324
+ □ Have you checked for container elements (div, span, p, section) that contain text interpolation?
325
+ □ For each Custom element, have you checked for BOTH slotted children AND non-slotted children?
326
+ □ Have you included ALL elements with a tag name of "slot"?
327
+ □ Have you included ALL elements with a tag name of "lwc:component"?
328
+ □ Have you verified elements nested inside conditional directives are marked nullable?
329
+ □ Have you searched for ALL 'for:each' directives and identified their IMMEDIATE child elements?
330
+ □ Have you verified that the immediate child of each for:each has returnAll=true?
331
+ □ Have you verified each element's scope points to its IMMEDIATE parent in the identified element list?
332
+ □ Have you traced the nesting hierarchy carefully without skipping levels?
333
+ □ Have you identified the IMMEDIATE child of each template with a for:each directive (not nested children)?
334
+ □ Have you included container elements that hold text content or serve semantic purposes?
335
+ □ For every template with a for:each directive, have you verified only the direct child has returnAll=true and all nested elements have returnAll=false?
336
+ □ Have you identified the root element of the component and verified if it should be included?
337
+ □ Have you checked if the root element has dynamic attributes or serves as scope for other elements?
338
+ □ Have you searched for elements with static but semantically meaningful text (required indicators, badges, status icons)?
339
+ □ Have you verified that visual indicators (\*, !, ✓) are included even if they contain static text?
340
+ □ Have you included elements that convey UI state or validation requirements?
341
+
342
+ ## Step 4: Identify Methods
343
+
344
+ Based on generated list of elements generated in step 1 and LWC source code, generate list of public methods for the same page object.
345
+ **IMPORTANT:** When identifying methods, you must ONLY use the list of elements identified in step 1. You must NOT use any other information, such as the component's documentation, or any other external information.
346
+ Do not remove or change already identified elements, only add generated methods.
347
+ Apply the following approach to identify methods:
348
+
349
+ 1. Method encapsulates user interactions with identified element by applying actions via mouse or keyboard like clicking or entering text.
350
+ 2. Method encapsulates assertions by returning element state and properties such as visibility or text.
351
+ 3. For every method that changes element state or text or property or attribute, add method that returns state or property or attributes to assert the change.
352
+ 4. You **MUST NOT** generate any methods for elements with types "Custom", "Slot" or "Dynamic".
353
+ 5. Method must only target existing elements.
354
+ 6. Methods should cover all possible interactions and assertions.
355
+ 7. Make sure to add at least one method that asserts element state for each element with type Basic.
356
+ 8. Every generated method must be reported using the following format:
357
+
358
+ - Descriptive name
359
+ - Text description
360
+ - Statements
361
+
362
+ Apply the following rules for method descriptive name:
363
+
364
+ - Use camelCase format.
365
+
366
+ Apply the following rules for method text description:
367
+
368
+ - Use a concise plain text description of the method.
369
+ - Describe the method in a way that is easy to understand and use.
370
+ - Describe the method in a way that is easy to understand by a non-technical user.
371
+
372
+ Apply the following rules for method statements:
373
+
374
+ - Element must point to the name of one of the identified elements. Make sure to use correct name of the element.
375
+ - Applied action must be inferred from "events" in the element, for example if element has event "onfocus", apply action "focus".
376
+ - Do not apply action if the element does not have matching event, for example do not apply action "click" if element does not have event "onclick".
377
+ - Apply action that returns element state, property or value even if element does not handle related events.
378
+ - Pay attention to the element type:
379
+
380
+ 1. Statement must not use elements with type "Custom", "Slot" or "Dynamic" because they don't support any actions.
381
+ 2. For other types supported actions are:
382
+ 2.1. For elements where returnAll is true: 'size'.
383
+ 2.2. For type Actionable: 'blur', 'focus', 'moveTo'.
384
+ 2.3. For type Clickable: 'click', 'doubleClick', 'rightClick', 'clickAndHold'.
385
+ 2.4. For type Editable: 'clear', 'setText', 'clearAndType'.
386
+ 2.5. For type Draggable: 'dragAndDrop'.
387
+ 2.6. For type Basic: 'getAttribute', 'getText', 'getTitle', 'getValue', 'isFocused', 'isEnabled', 'isPresent', 'isVisible'.
388
+ 2.7. Types "Actionable", "Clickable", "Editable" and "Draggable" also support actions of the type "Basic".
389
+
390
+ - Only apply action to the element if it's supported for the element type.
391
+ - Do not use actions that are not listed above because they are not supported.
392
+ - Do not add any parameters to applied actions, for example statement "element.getAttribute('label')" is invalid, should be "element.getAttribute".
393
+
394
+ ## Step 5: Filter Non-Public, Unreferenced Elements
395
+
396
+ After generating the list of elements (Step 3) and methods (Step 4), filter out elements that serve no purpose in the public API:
397
+
398
+ ### Filtering Rules:
399
+
400
+ 1. **Review each element** where public would be false (property omitted in JSON)
401
+
402
+ 2. **Check if the element is referenced** by any method identified in Step 4:
403
+
404
+ - Search through all method statements
405
+ - If any statement uses this element's name, the element IS REFERENCED
406
+ - Example: If method statement is "buttonTriggerText.getText", then "buttonTriggerText" is referenced
407
+
408
+ 3. **Remove the element** from the identified element list if ALL of the following are true:
409
+
410
+ - Element would have public=false (no public property)
411
+ - Element is NOT referenced by any method statement
412
+ - Element is NOT the root container element (first element inside <template>)
413
+ - Element is NOT serving as scope for any OTHER elements that remain in the list
414
+ - Element is NOT a Custom or Dynamic type (these are always public=true)
415
+ - Element does NOT have returnAll=true (these are always public=true)
416
+
417
+ 4. **Update child element scopes** when removing a parent:
418
+
419
+ - If you remove an element that was serving as scope for other elements
420
+ - Update those child elements' scope to point to the removed element's parent scope
421
+ - Example: If removing "container" (scope: root) that had child "button" (scope: container)
422
+ Then update "button" to have scope: root
423
+
424
+ 5. **Apply recursively**:
425
+ - After removing an element, check if its parent now meets the removal criteria
426
+ - Continue until no more elements can be removed
427
+
428
+ ### Examples:
429
+
430
+ **Example 1: Remove Decorative Icon**
431
+ Element: inputPillIcon (Custom, public=false)
432
+
433
+ - NOT referenced by any method
434
+ - NOT serving as scope for other elements
435
+ - NOT the root element
436
+ → REMOVE from element list
437
+
438
+ **Example 2: Keep Element Referenced by Method**
439
+ Element: buttonTriggerText (Basic, public=false)
440
+
441
+ - Referenced by method "getButtonText" with statement "buttonTriggerText.getText"
442
+ → KEEP in element list
443
+
444
+ **Example 3: Keep Root Container**
445
+ Element: comboboxContainer (Basic, public=false, scope: root)
446
+
447
+ - NOT referenced by any method
448
+ - BUT is the root container element
449
+ - Serves as scope for multiple elements
450
+ → KEEP in element list
451
+
452
+ **Example 4: Keep Scope-Serving Container**
453
+ Element: pillCloseButton (Clickable, public=true)
454
+
455
+ - Has child: pillCloseAssistiveText (public=false, referenced by method)
456
+ - Serves as scope for a kept element
457
+ → KEEP in element list (and keep its public=true status)
458
+
459
+ ### Output After Filtering:
460
+
461
+ Provide two lists:
462
+
463
+ 1. **Kept Elements**: Final list of elements to include in UTAM Page Object JSON
464
+ 2. **Removed Elements**: List of elements filtered out (for transparency/review)
465
+
466
+ Format:
467
+
468
+ # Final Element List (After Filtering)
469
+
470
+ ## Kept Elements:
471
+
472
+ comboboxContainer (root container, serves as scope)
473
+ comboboxInput (public=true, interactive)
474
+ buttonTriggerText (public=false, referenced by getButtonText method)
475
+ ... etc
476
+
477
+ ## Removed Elements:
478
+
479
+ inputPillIcon (decorative, not referenced)
480
+ pillCloseIcon (decorative, not referenced)
481
+ ... etc
482
+
483
+ ## FINAL VERIFICATION CHECKLIST
484
+
485
+ Before providing the final element and method lists, confirm you have completed:
486
+
487
+ **Non-public Element Filtering:**
488
+ □ Have you identified which elements would have public=false?
489
+ □ Have you checked EACH public=false element against ALL method statements?
490
+ □ Have you marked which elements are referenced vs unreferenced?
491
+ □ Have you removed unreferenced, non-public elements (except root and scope-serving)?
492
+ □ Have you updated child element scopes after removing parent elements?
493
+ □ Have you verified no Custom/Dynamic/returnAll=true elements were removed?
494
+ □ Have you provided both "Kept Elements" and "Removed Elements" lists?
495
+
496
+ **Ready for JSON Generation:**
497
+ □ The final element list contains only elements that are public=true OR referenced by methods OR serve as scope
498
+ □ All methods reference only elements that remain in the final element list
499
+ □ Child element scopes have been updated to point to existing parent elements