Function waitForValueChange

  • Waits for the value to change for a given input fields.

    Parameters

    • ctx: Context

      Context object.

    • selector: string

      The selector for the input element.

    • Optional waitOptions: WaitValueOptions

      Wait options.

    Returns Promise<null | ElementHandle<Element>>

    Example

    const selector = '#input-field-id';
    const waitOptions = { timeout: 5000, polling: 100, initialValue: 'initial value' };

    waitForValueChange(context, selector, waitOptions)
    .then(handle => console.log('Value changed', handle))
    .catch(error => console.error('Error waiting for value change', error));