Address Helper Functions#

This section documents address helper functions used in the automation testing suite.

fillAddressFieldWithWait#

Deprecated since version 1.0: Use fillCityAllApproaches or other *AllApproaches functions instead.

fillAddressFieldWithWait(page, fillFunction, value, waitTime)#

Fills an address field and applies a standard wait time

Arguments:
  • page (Page) – Playwright page object

  • fillFunction – Function that fills the specific address field

  • value (string) – Value to fill in the field

  • waitTime (number) – Optional wait time in ms (default: 1000)

Returns:

Promise

fillCity#

Deprecated since version 1.0: Use fillCityAllApproaches instead.

fillCity(page, cityValue, nth)#

fillCity A specialized version of safeFill for the “City” field to reduce repeated lines across your test. If you have the same fallback logic for “City,” you can unify it here.

Arguments:
Returns:

Promise

fillCityAllApproaches#

fillCityAllApproaches(page, value, fallbackInputSelector)#
Arguments:
Returns:

Promise

fillPrimaryAndMailingAddresses#

fillPrimaryAndMailingAddresses(page, useMailingAddress)#
Arguments:
Returns:

Promise

fillPrimaryAndMailingAddressesAllApproaches#

fillPrimaryAndMailingAddressesAllApproaches(page, useMailingAddress)#
Arguments:
Returns:

Promise

fillPrimaryAndMailingAddressesCITCorp#

fillPrimaryAndMailingAddressesCITCorp(page, useMailingAddress, justRequired, mailingAddress, mailingAptNumber, mailingCityName, mailingStateName, mailingStreetName, mailingZipCode, primaryAptNumber, primaryCityName, primaryStateName, primaryStreetName, primaryZipCode)#
Arguments:
Returns:

Promise

fillStateAllApproaches#

fillStateAllApproaches(page, optionName, fallbackAction)#
Arguments:
Returns:

Promise

fillStreetName#

fillStreetName(page, value)#
Arguments:
Returns:

Promise

fillStreetNameAllApproaches#

fillStreetNameAllApproaches(page, value, fallbackInputSelector, targetIndex, containerSelector)#

fillStreetNameAllApproaches

Tries multiple CIT approaches to fill the Street Name field. If all attempts fail, it falls back to using a provided fallback selector.

Arguments:
  • page (Page) – Playwright Page object.

  • value (string) – The street value to fill.

  • fallbackInputSelector (string) – The fallback selector (e.g. “#mat-input-6”).

  • targetIndex (number) – The index of the target element (e.g., 2 for nth(2)).

  • containerSelector (string)

Returns:

Promise

fillSuiteAllApproaches#

fillSuiteAllApproaches(page, value, fallbackInputSelector)#
Arguments:
Returns:

Promise

fillSuiteApt#

Deprecated since version 1.0: Use fillSuiteAllApproaches instead.

fillSuiteApt(page, aptValue, nth)#

fillSuiteApt A specialized version for “Suite/Apt Number”.

Arguments:
Returns:

Promise

fillZip#

Deprecated since version 1.0: Use fillZipAllApproaches instead.

fillZip(page, zipValue, nth)#

fillZip Another small helper if you often fill Zip Code the same way.

Arguments:
Returns:

Promise

fillZipAllApproaches#

fillZipAllApproaches(page, finalValue, fallbackInputSelector, container)#

fillZipAllApproaches

Attempts the CIT approach to fill a Zip Code field. If that fails, it falls back to a sequence (dblclick, fill intermediate, press Insert, fill final) using the provided fallback selector.

Arguments:
  • page (Page) – The Playwright Page object.

  • finalValue (string) – The final zip code value (e.g. “97204”).

  • fallbackInputSelector (string) – A fallback CSS selector (e.g. “#mat-input-9” or “input”)

  • container (Locator) – Optional: a Locator to scope all operations (for example, a mailing section).

Returns:

Promise

streetNameTry#

streetNameTry(page, identifier, value, tabFallbackCount)#
Arguments:
Returns:

Promise