How fetch the search results

Hi
When we search for something in search box we get multiple results,
how to fetch that results.I have attached a image.
paytm

obatined result will vanish as soon as mouse over/clicked on something

Buddy you can take a screenshot once after typing…with which you can know the search results appeared and then opening the image and screen scrapping
or
directly screen scrapping the search results buddy
Cheers @KarthikBallary

I need to know , when I type something if there are multiple results , ctrl+A+baack.

but how do I/system know its multiple result?

i didnt get you buddy @KarthikBallary

From attached image, you will type “movies”,
now u have obtained multiple results like sarada movies, lakshmi movies.
when I get multiple results I will erase my data(i.e. movies)

Automate this

How do ui path know multi results has occured?

what site are you using @KarthikBallary?

You should be able to scrape the pop up list with no issues using scraping

Fine buddy @KarthikBallary

  1. use a click activity to make a click on the field you want to type
  2. use type into activity to type you want
  3. use send hot key with key down and again another one send hot key with key enter
  4. if it has any value below it will go else it wont
  5. to make sure it goes or not use a find element or find image of any of the element or an image in the screen where you search from…if the page changes you wont be able to find that element or image
    or you will be able to find that element or image
    simple
    Cheers @KarthikBallary

@KarthikBallary I wouldn’t use find image as the text will change with every search term. It’s much safer to:

  1. use type into on the search box
  2. use data scraping on the dropdown options, as they will be structured data
  3. use the created datatable to do what you need to with the list of potential search options

Simples!

@KarthikBallary

  1. use Type Into activity to type text there.
  2. And then use Screen scraping to scrape the data and then store that result into string variable say ‘searchResults’.
  3. And then split that string based on new line like:

int resultsCount = searchResults.Split(Environment.NewLine.ToCharArray).count

IF resultsCount > 1
Then erase data
Else take it.

thank you will try and let you know

1 Like