FrameworkPart1 - MavenProject - Verify items in Cart -Streams & Checkout - MrBeatCoderDebutOwnVoice

Поділитися
Вставка
  • Опубліковано 29 вер 2024
  • In this lesson, we will learn the logic and code to verify items in the cart with Streams and Checkout
    Steps: Logic and code to verify items in the cart with Streams and Checkout
    1. Declare a new String called productName with value “ZARA COAT 3”, and replace productName with where will inputted the String ZARA COAT 3
    2. Grab all the product name web elements and store them into a new list of Web Elements called, cartProducts
    3. Use cartProducts and apply stream
    a. Use the method, anyMatch, and then apply lambda expression to get text and equalsIgnoreCase with productName
    b. Store this into a boolean called, match
    c. If the above is valid, it will return true, so match will equal to true
    4. Use Assert.assertTrue(match) - assert true of true is a Pass
    5. Click on check out button

КОМЕНТАРІ •