Skip to content

Custom Commands

Manuel edited this page May 27, 2024 · 3 revisions

fillLoginForm

Fills the login form with provided user credentials.

Parameters:

  • userCredentials -Object containing user credentials.

fillSignupForm

Fills the signup form with provided user credentials.

Parameters:

  • userCredentials -Object containing user credentials.

fillAccountInformationForm

Fills the account information form with provided data.

Parameters:

  • userCredentials -User credentials object containing account data.

signupUser

Signs up a user with provided user credentials.

Parameters:

  • userCredentials -Object containing user credentials.

fillPaymentDetails

Fills the payment details form with provided data.

Parameters:

  • paymentData -Object containing payment details.

addProductToCart

Adds a product to the cart.

Parameters:

  • productNumber -Index of the product to add.

getElementAndAssertText

Adds a product to the cart.

Parameters:

  • element -Selector of the element to retrieve.
  • text -Expected text content of the element.

searchProduct

Searches for a product using the search box.

Parameters:

  • productQuery -The query string for the product search.

getUserWithAPI

Retrieves user details by making an API request.

Parameters:

  • email -Email of the user.

loginUserWithAPI

Logins a user by making an API request.

Parameters:

  • userCredentials -Object containing user credentials.

registerUserWithAPI

Registers a user by making an API request.

Parameters:

  • userCredentials -Object containing user credentials.

deleteUserWithAPI

Deletes a user account by making an API request.

Parameters:

  • userCredentials -Object containing user credentials.