Creating Pattern To access web GUI element

Hello sir/madam

This is shubham Prajapati I am facing the problem in storing the list of product name from searched result Flipkart.

Problem :

  1. I searched “Motorola mobile” in flipkart search box and list of motorola mobile displayed

2)Now I want to store all the name of product (24 product name listed out of Number of search result in first page). In this search result 117 product listed (See snapshot or Click on URL above.

As every product name has **different X-path ,**so creating problem to access individual element

  1. I want to store all these 24 product name and click on NEXT button at bottom.

this to be continue till reaches last product name

In Ui-Path We can create pattern of selection of element and it automatically select element one by

one and were able to store all the product name list till the last product name.

Is There Any way that we can do?

Yes, you need to manually create the Xpath as a Variable, where you would add +1 do that XPath and that would be the next product on the page. Until you’ll try to access an element that doesn’t exist, then you click on the next element, You’ll have to create a loop in the process.
Here’s an image from the process and how it would look like:

Here’s the Start Loop Configuration:

At the exit loop you’ll change the value for the var LinhaExiste:
var LinhaExiste = false ;

Hope it helps

Hi Shubham,

  1. first get number of div present on web page
  2. then iterate loop till that number of div calculated from the 1. step.
  3. use this Xpath inside the for loop //*[@id=“container”]/div/div[3]/div[1]/div[2]/div[“replace i value here”]/div/div/div/a/div[2]/div[1]/div[1]
  4. Once loop get finished click on next button till button is present
  5. you will require one while and one for loop here
  6. first while loop for click on next button and inside that you will need one for loop for iterate devices

Ok I’ll Try