/** * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE file or https://utam.dev/salesforce/license */ import { Driver as _Driver, Element as _Element, Locator as _Locator, UtamBasePageObject as _UtamBasePageObject } from '@utam/core'; import _BaseCombobox from 'salesforce-pageobjects/lightning/pageObjects/baseCombobox'; import _LookupDesktop from 'salesforce-pageobjects/lightning/pageObjects/lookupDesktop'; /** * Selector: lightning-lookup * Represents the lightning-lookup Lightning web component. * generated from JSON dist/lightning/lookup.utam.json * @version 2026-03-09T13:56:36.131Z * @author Salesforce */ export default class Lookup extends _UtamBasePageObject { constructor(driver: _Driver, element?: _Element, locator?: _Locator); /** * Delete pill by index. Should only be used in a multi-value lookup use-case (starts at 1). * @return none */ deletePill(index: number): Promise; /** * Delete all the selected records from the pill container. Should only be used in a multi-value lookup use-case. * @return none */ deleteAllPills(): Promise; /** * Get all the selected records label from the pill container. Should only be used in a multi-value lookup use-case. * @return string[] */ getAllPills(): Promise; /** * Type a text into the combobox input. * @return none */ type(text: string): Promise; /** * Gets the input text * @return string */ getInputText(): Promise; /** * Select a record in the combobox by label. If the record has a secondary field, * it must be included in the label after the primary field (record's name) separated * with a `\n` character (e.g. MyRecordName\nMyRecordSecondaryField) * @return none */ selectRecordSuggestionByLabel(text: string): Promise; /** * Select an item in the combobox by value. * @return none * @deprecated in Spring '24 release, use selectRecordSuggestionByLabel */ selectFromList(text: string): Promise; /** * Gets the label of the selected record * @return string */ getSelectedRecordLabel(): Promise; /** * Did we select a record? * @return boolean */ hasSelectedRecord(): Promise; /** * Clears the selected record. Should only be used in a single-value lookup use-case. * @return none */ clearSelectedRecord(): Promise; /** * Returns the selected entity of the entity selector * @return string */ getSelectedEntity(): Promise; /** * Select an item in the entity selector's combobox by value (objectApiName). Should only be used in a multi-object lookup use-case. * @return none */ selectEntityInEntitySelector(text: string): Promise; /** * Determine if the entity selector is present in the DOM or not. * @return boolean */ isEntitySelectorPresent(): Promise; /** * Get the baseCombobox component. * @return baseCombobox page object * @deprecated in Spring '24 release, use other lookup UTAM methods instead */ getBaseCombobox(): Promise<_BaseCombobox>; /** * Open the advanced modal when we are on a desktop form factor * @return none */ showDesktopAdvancedModal(): Promise; /** * Request the creation of a new record * @return none */ selectCreateNewAction(): Promise; /** * Ensure the create new action is present * @return boolean */ isCreateNewActionPresent(): Promise; /** * Get the error message displayed * @return string */ getErrorMessage(): Promise; /** * Clear the input text into the combobox input. * @return none */ clearInput(): Promise; /** * Wait until suggestions are loaded * @return none */ waitForSuggestions(): Promise; /** * Determine if the component is disabled * @return boolean */ isDisabled(): Promise; /** * Determine if the component is enabled * @return boolean */ isEnabled(): Promise; /** * Determine if the component is required * @return boolean */ isRequired(): Promise; /** * Waits for the lookup component to be ready */ waitUntilReady(): Promise; /** * DO NOT USE - use provided methods instead * @deprecated Accessing a child component breaks the abstraction provided by the Page Object model. This selector will no longer be accessible in near future, please use the component's public methods instead. */ getLookupDesktop(): Promise<_LookupDesktop>; }