How to pass loop through multiple values and perform a "Click" action every time but on different web page in Web GUI?

I am working on a web automation scenario where I need to:

  1. Pass three different values (set value to search field) into a specific web field one by one.

  2. After each value is set, perform a mouse click action (specifically, an “Add to Cart” button each time for different product).

What is the best way to loop this sequence with 3 different value ?

Hi Pushkraj,

You can handle this using a simple loop with a data-driven approach:

  • Store the values in an Excel/CSV file.

  • Use a For Each Row loop to iterate through them.

  • Within the loop, set the search value and click “Add to Cart”.

1 Like